Implementing Activate User
This commit is contained in:
parent
81c207ae28
commit
860c7d8067
1 changed files with 1 additions and 3 deletions
4
admin.go
4
admin.go
|
@ -6,7 +6,6 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-ldap/ldap/v3"
|
"github.com/go-ldap/ldap/v3"
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
@ -85,10 +84,9 @@ func handleAdminActivateUser(w http.ResponseWriter, r *http.Request) {
|
||||||
modifyRequest := *ldap.NewModifyDNRequest("cn="+cn+","+config.InvitationBaseDN, "cn="+cn, true, config.UserBaseDN)
|
modifyRequest := *ldap.NewModifyDNRequest("cn="+cn+","+config.InvitationBaseDN, "cn="+cn, true, config.UserBaseDN)
|
||||||
err := login.conn.ModifyDN(&modifyRequest)
|
err := login.conn.ModifyDN(&modifyRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
http.Redirect(w, r, "/admin/ldap/"+"cn="+cn+","+config.UserBaseDN), http.StatusFound)
|
http.Redirect(w, r, "/admin/ldap/"+"cn="+cn+","+config.UserBaseDN, http.StatusFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleAdminUsers(w http.ResponseWriter, r *http.Request) {
|
func handleAdminUsers(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
Loading…
Reference in a new issue