fix
This commit is contained in:
parent
f86c687bd8
commit
982f5e1df9
|
@ -57,7 +57,7 @@ func (l *UpdateLdapUserLogic) UpdateLdapUser(req *types.UpdateLdapUserReq, r *ht
|
|||
}
|
||||
//把用户名转pinyin
|
||||
userNamePinyin := chinese_to_pinyin.ChineseToPinyin(req.UserName)
|
||||
now := time.Now()
|
||||
now := time.Now().UTC()
|
||||
//更新的属性
|
||||
attr := map[string][]string{
|
||||
"homeDirectory": {"/home/users/" + userNamePinyin},
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"fusenapi/model/gmodel"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/email"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"context"
|
||||
|
||||
|
@ -66,6 +68,13 @@ func (l *UpdateLdapUserPwdLogic) UpdateLdapUserPwd(req *types.UpdateLdapUserPwdR
|
|||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "修改密码失败")
|
||||
}
|
||||
now := time.Now().UTC()
|
||||
err = l.svcCtx.AllModels.LdapUser.Update(l.ctx, req.UserDN, &gmodel.LdapUser{
|
||||
Utime: &now,
|
||||
})
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "修改密码成功")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user