# HG changeset patch
# User Holger Just <hjust@meine-er.de>
# Date 1333979031 -7200
# Node ID e85bde2ff79181f50633c2472e9ffa549b9cf57f
# Parent  83acc5b1cb5a026ec1578ddc3f5f1b3f0256c6e6
Take the password salt into account when checking for admin account change

diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -76,8 +76,7 @@ class AdminController < ApplicationContr
     @db_adapter_name = ActiveRecord::Base.connection.adapter_name
     @checklist = [
       [:text_default_administrator_account_changed,
-          User.find(:first,
-                    :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?],
+          !User.find_by_login("admin").try(:check_password?, "admin")],
       [:text_file_repository_writable, File.writable?(Attachment.storage_path)],
       [:text_plugin_assets_writable,   File.writable?(Redmine::Plugin.public_directory)],
       [:text_rmagick_available,        Object.const_defined?(:Magick)]
