CakePHP 1.3 のすべてではないにしてもほとんどのチュートリアルを Auth メソッドで試しましたが、CakePHP 2.0 では機能しないようです。
ユーザーを追加し、パスワードをハッシュできますが、ログイン機能が機能しません。ログインをクリックすると、ページが更新されるだけです。エラーも何もありません。
いくつかのヒントをいただければ幸いです。私の質問を読んでいただきありがとうございます。
これは私のコード public function login() {
if ($this->request->is('post') )
{
if( $this->Auth->login() )
{
// the redirect() function in the Auth class redirects us
// to the url we set up in the AppController.
return $this->redirect( $this->Auth->redirect());
}
else
{
$this->Session->setFlash(__('Email or password is incorrect',true));
}
}
}
ありがとう、マハデバ・プラサド