mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't allow username update via update route
It's not using the UsernameChanger
This commit is contained in:
parent
452a6bfa9c
commit
2d340d1122
@ -107,6 +107,9 @@ class UsersController < ApplicationController
|
||||
guardian.ensure_can_edit!(user)
|
||||
attributes = user_params.merge!(custom_fields: params[:custom_fields])
|
||||
|
||||
# We can't update the username via this route. Use the username route
|
||||
attributes.delete(:username)
|
||||
|
||||
if params[:user_fields].present?
|
||||
attributes[:custom_fields] = {} unless params[:custom_fields].present?
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user