Skip to content
Snippets Groups Projects
Commit 07f156f5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Dont update namespace if User name was changed. Use user#username for...

Dont update namespace if User name was changed. Use user#username for namespace name because Namespace#name validates by uniq
parent 3d41e182
No related branches found
No related tags found
1 merge request!5081fixed command to update init script
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment