mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 03:00:18 +08:00
feat: support resetting password on first login (#2980)
* feat: support reset password in first login * feat: disable needUpdatePassword when user haven't email and phone and mfa
This commit is contained in:
@ -411,6 +411,10 @@ func CheckPermissionForUpdateUser(oldUser, newUser *User, isAdmin bool, lang str
|
||||
item := GetAccountItemByName("Is deleted", organization)
|
||||
itemsChanged = append(itemsChanged, item)
|
||||
}
|
||||
if oldUser.NeedUpdatePassword != newUser.NeedUpdatePassword {
|
||||
item := GetAccountItemByName("Need update password", organization)
|
||||
itemsChanged = append(itemsChanged, item)
|
||||
}
|
||||
|
||||
if oldUser.Score != newUser.Score {
|
||||
item := GetAccountItemByName("Score", organization)
|
||||
|
Reference in New Issue
Block a user