Mercurial > hg > soundsoftware-site
comparison app/models/user.rb @ 931:ec1c49528f36 cannam_integration
Merge from branch "redmine-1.3"
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 15:04:58 +0100 |
parents | 5e80956cc792 5f33065ddc4b |
children | bb32da3bea34 |
comparison
equal
deleted
inserted
replaced
930:027cc0f5d4a2 | 931:ec1c49528f36 |
---|---|
355 # Makes find_by_mail case-insensitive | 355 # Makes find_by_mail case-insensitive |
356 def self.find_by_mail(mail) | 356 def self.find_by_mail(mail) |
357 find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase]) | 357 find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase]) |
358 end | 358 end |
359 | 359 |
360 # Returns true if the default admin account can no longer be used | |
361 def self.default_admin_account_changed? | |
362 !User.active.find_by_login("admin").try(:check_password?, "admin") | |
363 end | |
364 | |
360 def to_s | 365 def to_s |
361 name | 366 name |
362 end | 367 end |
363 | 368 |
364 # Returns the current day according to user's time zone | 369 # Returns the current day according to user's time zone |