mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-24 11:09:44 +08:00
Fix update user (#18878)
This commit is contained in:
parent
f1b1472632
commit
6621710deb
@ -868,13 +868,14 @@ func updateUser(ctx context.Context, u *User, changePrimaryEmail bool, cols ...s
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !primaryEmailExist {
|
if !primaryEmailExist {
|
||||||
_, err = e.Insert(&EmailAddress{
|
if _, err := e.Insert(&EmailAddress{
|
||||||
Email: u.Email,
|
Email: u.Email,
|
||||||
UID: u.ID,
|
UID: u.ID,
|
||||||
IsActivated: true,
|
IsActivated: true,
|
||||||
IsPrimary: true,
|
IsPrimary: true,
|
||||||
})
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user