mirror of
https://github.com/gogs/gogs.git
synced 2025-12-22 16:20:14 +01:00
refactor(db): add Users.Update (#7263)
This commit is contained in:
@@ -225,7 +225,7 @@ func SettingsPost(c *context.Context, f form.RepoSetting) {
|
||||
}
|
||||
|
||||
newOwner := c.Query("new_owner_name")
|
||||
if !db.Users.IsUsernameUsed(c.Req.Context(), newOwner) {
|
||||
if !db.Users.IsUsernameUsed(c.Req.Context(), newOwner, c.Repo.Owner.ID) {
|
||||
c.RenderWithErr(c.Tr("form.enterred_invalid_owner_name"), SETTINGS_OPTIONS, nil)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user