diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index a37c4dffa..d1fa2822a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -348,6 +348,11 @@ class User < Principal 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 |