Implementing Activate User

This commit is contained in:
Chris Mann 2023-07-21 07:27:29 +02:00
parent 81c207ae28
commit 860c7d8067

View file

@ -6,7 +6,6 @@ import (
"regexp"
"sort"
"strings"
"net/http"
"github.com/go-ldap/ldap/v3"
"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)
err := login.conn.ModifyDN(&modifyRequest)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
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) {