fix: 当用户策略为clear时,存入原文 (#341)
This commit is contained in:
parent
2fe390f1e3
commit
e2c2ea6bfd
|
@ -31,7 +31,7 @@ func (x UserService) Add(user *model.User) error {
|
|||
add.Attribute("uid", []string{user.Username})
|
||||
var pass string
|
||||
if config.Conf.Ldap.UserPasswordEncryptionType == "clear" {
|
||||
pass = user.Password
|
||||
pass = tools.NewParPasswd(user.Password)
|
||||
} else {
|
||||
pass = tools.EncodePass([]byte(tools.NewParPasswd(user.Password)))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue