Mercurial > hg > soundsoftware-site
comparison app/models/user.rb @ 929:5f33065ddc4b redmine-1.3
Update to Redmine SVN rev 9414 on 1.3-stable branch
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 14:54:18 +0100 |
parents | cbb26bc654de |
children | ec1c49528f36 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
909:cbb26bc654de | 929:5f33065ddc4b |
---|---|
339 end | 339 end |
340 | 340 |
341 # Makes find_by_mail case-insensitive | 341 # Makes find_by_mail case-insensitive |
342 def self.find_by_mail(mail) | 342 def self.find_by_mail(mail) |
343 find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase]) | 343 find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase]) |
344 end | |
345 | |
346 # Returns true if the default admin account can no longer be used | |
347 def self.default_admin_account_changed? | |
348 !User.active.find_by_login("admin").try(:check_password?, "admin") | |
344 end | 349 end |
345 | 350 |
346 def to_s | 351 def to_s |
347 name | 352 name |
348 end | 353 end |