Mercurial > hg > soundsoftware-site
diff 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 |
line wrap: on
line diff
--- a/app/models/user.rb Wed Jun 27 14:56:14 2012 +0100 +++ b/app/models/user.rb Wed Jun 27 15:04:58 2012 +0100 @@ -357,6 +357,11 @@ find(:first, :conditions => ["LOWER(mail) = ?", mail.to_s.downcase]) end + # Returns true if the default admin account can no longer be used + def self.default_admin_account_changed? + !User.active.find_by_login("admin").try(:check_password?, "admin") + end + def to_s name end