Cakephp 2.4 である Cakephp の最新バージョンをダウンロードしました。
認証コンポーネントを使用している場合、パスワードがチェックされません。
SQLダンプを見ると、それが表示されます
SELECT User.id, User.role_id, User.username, User.password,
User.email, User.first_name, User.last_name, User.activation_key,
User.status, User.created, User.modified
FROM cakephp.users AS User WHERE User.username = 'admin'
AND User.status = 1 LIMIT 1
そのはず
SELECT User.id, User.role_id, User.username, User.password, User.email,
User.first_name, User.last_name, User.activation_key, User.status,
User.created, User.modified FROM cakephp.users AS User
WHERE User.username = 'admin'
AND User.password = '32ddqdsd34sfgtbvge434' AND User.status = 1 LIMIT 1
私のAuthコンポーネントコードは
$this->Auth->userModel = 'User';
$this->Auth->authenticate = array(
'Form' => array(
'scope' => array('User.status' => 1)
)
);
$this->Auth->loginError = __("login_failed_invalid_username_or_password");
$this->Auth->loginAction = array('admin' => true, 'controller' => 'admins', 'action' => 'login');
$this->Auth->loginRedirect = array('admin' => true, 'controller' => 'admins', 'action' => 'dashboard');
$this->Auth->authError = __('you_must_login_to_view_this_information');
$this->Auth->autoRedirect = true;