diff --git a/app/observers/user_observer.rb b/app/observers/user_observer.rb index e969405a598..fba0f1006d9 100644 --- a/app/observers/user_observer.rb +++ b/app/observers/user_observer.rb @@ -13,8 +13,8 @@ class UserObserver < BaseObserver # Ensure user has namespace user.create_namespace!(path: user.username, name: user.username) unless user.namespace - if user.username_changed? || user.name_changed? - user.namespace.update_attributes(path: user.username, name: user.name) + if user.username_changed? + user.namespace.update_attributes(path: user.username, name: user.username) end end end