mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20: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:
@ -203,7 +203,8 @@ type User struct {
|
||||
LastSigninWrongTime string `xorm:"varchar(100)" json:"lastSigninWrongTime"`
|
||||
SigninWrongTimes int `json:"signinWrongTimes"`
|
||||
|
||||
ManagedAccounts []ManagedAccount `xorm:"managedAccounts blob" json:"managedAccounts"`
|
||||
ManagedAccounts []ManagedAccount `xorm:"managedAccounts blob" json:"managedAccounts"`
|
||||
NeedUpdatePassword bool `json:"needUpdatePassword"`
|
||||
}
|
||||
|
||||
type Userinfo struct {
|
||||
@ -682,7 +683,7 @@ func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, er
|
||||
"eveonline", "fitbit", "gitea", "heroku", "influxcloud", "instagram", "intercom", "kakao", "lastfm", "mailru", "meetup",
|
||||
"microsoftonline", "naver", "nextcloud", "onedrive", "oura", "patreon", "paypal", "salesforce", "shopify", "soundcloud",
|
||||
"spotify", "strava", "stripe", "type", "tiktok", "tumblr", "twitch", "twitter", "typetalk", "uber", "vk", "wepay", "xero", "yahoo",
|
||||
"yammer", "yandex", "zoom", "custom",
|
||||
"yammer", "yandex", "zoom", "custom", "need_update_password",
|
||||
}
|
||||
}
|
||||
if isAdmin {
|
||||
|
Reference in New Issue
Block a user