mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
#2154 disable change user for non-local users
- #2153 remove require for gravatar
This commit is contained in:
parent
5d95ffe3eb
commit
d0b0d24f22
8 changed files with 18 additions and 10 deletions
|
@ -79,8 +79,10 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
|
|||
ctx.User.Email = form.Email
|
||||
ctx.User.Website = form.Website
|
||||
ctx.User.Location = form.Location
|
||||
ctx.User.Avatar = base.EncodeMD5(form.Gravatar)
|
||||
ctx.User.AvatarEmail = form.Gravatar
|
||||
if len(form.Gravatar) > 0 {
|
||||
ctx.User.Avatar = base.EncodeMD5(form.Gravatar)
|
||||
ctx.User.AvatarEmail = form.Gravatar
|
||||
}
|
||||
if err := models.UpdateUser(ctx.User); err != nil {
|
||||
ctx.Handle(500, "UpdateUser", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue