Fix update user bug (#18251)
This commit is contained in:
@ -1095,7 +1095,7 @@ func updateUser(e Engine, u *User, changePrimaryEmail bool) error {
|
||||
if _, err := e.Insert(&emailAddress); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if _, err := e.ID(emailAddress).Cols("is_primary").Update(&EmailAddress{
|
||||
} else if _, err := e.ID(emailAddress.ID).Cols("is_primary").Update(&EmailAddress{
|
||||
IsPrimary: true,
|
||||
}); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user