Refactoring
This commit is contained in:
parent
ba3fd90b10
commit
971d30f927
3 changed files with 8 additions and 2 deletions
|
@ -28,6 +28,7 @@ func get(user User, config *ConfigFile, ldapConn *ldap.Conn) (*User, error) {
|
|||
"sn",
|
||||
"mail",
|
||||
"description",
|
||||
"carLicense",
|
||||
},
|
||||
nil)
|
||||
searchRes, err := ldapConn.Search(searchReq)
|
||||
|
|
|
@ -220,7 +220,7 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi
|
|||
data.Common.Success = false
|
||||
data.Common.ErrorMessage = err.Error()
|
||||
}
|
||||
http.Redirect(w, r, "/admin/activate", http.StatusFound)
|
||||
http.Redirect(w, r, "/user/wait", http.StatusFound)
|
||||
}
|
||||
|
||||
// tryCreateAccount(l, data, password1, password2, invitedBy)
|
||||
|
|
|
@ -11,7 +11,12 @@ import (
|
|||
|
||||
func handleUserWait(w http.ResponseWriter, r *http.Request) {
|
||||
templateProfile := getTemplate("user/wait.html")
|
||||
templateProfile.Execute(w, nil)
|
||||
templateProfile.Execute(w, HomePageData{
|
||||
Common: NestedCommonTplData{
|
||||
CanAdmin: false,
|
||||
LoggedIn: false,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func handleUser(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
Loading…
Reference in a new issue