mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 18:54:03 +08:00
Improve UpdateUserToOriginalDatabase().
This commit is contained in:
parent
eca1d23e35
commit
cc47f3b65d
@ -114,8 +114,7 @@ func (c *ApiController) UpdateUser() {
|
|||||||
|
|
||||||
affected := object.UpdateUser(id, &user)
|
affected := object.UpdateUser(id, &user)
|
||||||
if affected {
|
if affected {
|
||||||
newUser := object.GetUser(user.GetId())
|
original.UpdateUserToOriginalDatabase(&user)
|
||||||
original.UpdateUserToOriginalDatabase(newUser)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Data["json"] = wrapActionResponse(affected)
|
c.Data["json"] = wrapActionResponse(affected)
|
||||||
|
@ -53,7 +53,9 @@ func UpdateUserToOriginalDatabase(user *object.User) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
updatedOUser := createOriginalUserFromUser(user)
|
newUser := object.GetUser(user.GetId())
|
||||||
|
|
||||||
|
updatedOUser := createOriginalUserFromUser(newUser)
|
||||||
updateUser(updatedOUser)
|
updateUser(updatedOUser)
|
||||||
fmt.Printf("Update from user to oUser: %v\n", updatedOUser)
|
fmt.Printf("Update from user to oUser: %v\n", updatedOUser)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user