fix ldap update user (#128)

This commit is contained in:
YD-SUN 2022-11-29 20:30:40 +08:00 committed by GitHub
parent 88dba4e992
commit 3cea73dcde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func (x UserService) Add(user *model.User) error {
// Update 更新资源
func (x UserService) Update(oldusername string, user *model.User) error {
modify := ldap.NewModifyRequest(user.UserDN, nil)
modify.Replace("cn", []string{user.Nickname})
modify.Replace("cn", []string{user.Username})
modify.Replace("sn", []string{oldusername})
modify.Replace("businessCategory", []string{user.Departments})
modify.Replace("departmentNumber", []string{user.Position})