Fixed Change Password Bug
This commit is contained in:
parent
084d33370f
commit
9ce93ddf8f
1 changed files with 1 additions and 2 deletions
3
gpas.go
3
gpas.go
|
@ -70,13 +70,12 @@ func passwordLost(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
|
|||
user.Mail = searchRes.Entries[0].GetAttributeValue("mail")
|
||||
user.OtherMailbox = searchRes.Entries[0].GetAttributeValue("carLicense")
|
||||
/* Check for outstanding invitation */
|
||||
searchReq = ldap.NewSearchRequest(user.DN, ldap.ScopeBaseObject,
|
||||
searchReq = ldap.NewSearchRequest(config.InvitationBaseDN, ldap.ScopeBaseObject,
|
||||
ldap.NeverDerefAliases, 0, 0, false, "(uid="+user.UID+")", []string{"seeAlso"}, nil)
|
||||
searchRes, err = ldapConn.Search(searchReq)
|
||||
if err != nil {
|
||||
log.Printf(fmt.Sprintf("passwordLost (Check existing invitation) : %v", err))
|
||||
log.Printf(fmt.Sprintf("passwordLost (Check existing invitation) : %v", user))
|
||||
log.Printf(fmt.Sprintf("passwordLost (Check existing invitation) : %v", searchRes.Entries[0]))
|
||||
return err
|
||||
}
|
||||
if len(searchRes.Entries) == 0 {
|
||||
|
|
Loading…
Reference in a new issue