aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app/models/user.rb')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/user.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
index ac04601fe30..599c749be57 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
@@ -61,7 +61,6 @@ class User < ActiveRecord::Base
result.blank? ? login : result
end
-
def email=(value)
write_attribute :email, (value ? value.downcase : nil)
end
@@ -79,7 +78,9 @@ class User < ActiveRecord::Base
end
def <=>(other)
- name<=>other.name
+ return -1 if name.nil?
+ return 1 if other.name.nil?
+ name.downcase<=>other.name.downcase
end