mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Users can change their own username at any time if they have no posts
This commit is contained in:
@@ -273,7 +273,7 @@ class Guardian
|
||||
end
|
||||
|
||||
def can_edit_username?(user)
|
||||
is_staff? || (is_me?(user) && user.created_at > SiteSetting.username_change_period.days.ago)
|
||||
is_staff? || (is_me?(user) && (user.post_count == 0 || user.created_at > SiteSetting.username_change_period.days.ago))
|
||||
end
|
||||
|
||||
# Deleting Methods
|
||||
|
||||
Reference in New Issue
Block a user