Remove hub username integration

This commit is contained in:
Neil Lalonde
2014-07-16 12:25:24 -04:00
parent 01a68f8cc7
commit 939e8505a9
19 changed files with 77 additions and 676 deletions

View File

@@ -106,14 +106,8 @@ class User < ActiveRecord::Base
LAST_VISIT = -2
end
GLOBAL_USERNAME_LENGTH_RANGE = 3..15
def self.username_length
if SiteSetting.enforce_global_nicknames
GLOBAL_USERNAME_LENGTH_RANGE
else
SiteSetting.min_username_length.to_i..SiteSetting.max_username_length.to_i
end
SiteSetting.min_username_length.to_i..SiteSetting.max_username_length.to_i
end
def custom_groups
@@ -176,11 +170,6 @@ class User < ActiveRecord::Base
def change_username(new_username)
current_username = self.username
self.username = new_username
if current_username.downcase != new_username.downcase && valid?
DiscourseHub.username_operation { DiscourseHub.change_username(current_username, new_username) }
end
save
end