wip1
This commit is contained in:
parent
977a75819d
commit
f25068075c
7 changed files with 113 additions and 22 deletions
|
|
@ -72,12 +72,11 @@ func updateUser(user ckh.User, body []byte) (interface{}, error) {
|
|||
return nil, errors.New("Username cannot be empty")
|
||||
}
|
||||
|
||||
if len(uu.Password) == 0 {
|
||||
return nil, errors.New("Password cannot be empty")
|
||||
}
|
||||
|
||||
user.Username = uu.Username
|
||||
user.ChangePassword(uu.Password)
|
||||
|
||||
if len(uu.Password) != 0 {
|
||||
user.ChangePassword(uu.Password)
|
||||
}
|
||||
|
||||
if _, err := user.Update(); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue