mirror of https://github.com/h44z/wg-portal.git
transform email addresses to lower case in ldap sync (#14)
This commit is contained in:
parent
e052f400aa
commit
97edd103be
|
|
@ -1,6 +1,7 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/h44z/wg-portal/internal/ldap"
|
"github.com/h44z/wg-portal/internal/ldap"
|
||||||
|
|
@ -117,7 +118,7 @@ func (s Server) UserChangedInLdap(user *users.User, ldapData *ldap.RawLdapData)
|
||||||
if user.Lastname != ldapData.Attributes[s.config.LDAP.LastNameAttribute] {
|
if user.Lastname != ldapData.Attributes[s.config.LDAP.LastNameAttribute] {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if user.Email != ldapData.Attributes[s.config.LDAP.EmailAttribute] {
|
if user.Email != strings.ToLower(ldapData.Attributes[s.config.LDAP.EmailAttribute]) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if user.Phone != ldapData.Attributes[s.config.LDAP.PhoneAttribute] {
|
if user.Phone != ldapData.Attributes[s.config.LDAP.PhoneAttribute] {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue