CakePHPã§ã¯ãèªè¨¼ã¯Authã³ã³ãã¼ãã³ãã§ã¦ã¼ã¶ç»é²ï¼ãã°ã¤ã³ãè¡ãã¨è¶
便å©ãã ãã©ããã°ã¤ã³å¦çãæåï¼èªåï¼ã§å®è¡ãããã£ã¦ããã¨ãã«ã¯ãã¡ãã£ã¨ããã£ããã¤ã³ãããã£ãã®ã§ã¡ã¢ã åæ CakePHP2.x æ®éã®ãã°ã¤ã³ç»é¢âèªè¨¼ã®æµã public function login() { if ($this->request->is('post')) { if ($this->Auth->login()) { return $this->redirect($this->Auth->redirectUrl()); } else { $this->Session->setFlash(__('Username or password is incorrect'), 'default', array(), 'auth'); } } } ã¾ããããã¥ã¢ã«ã«ãããéããæ®éã«ãã°ã¤ã³ç»
{{#tags}}- {{label}}
{{/tags}}