Fixed remember me cookie on login
This commit is contained in:
parent
47c9cf2ba5
commit
7b2180821c
|
|
@ -16,6 +16,8 @@ class AppController extends Controller {
|
|||
$this->Auth->allow('display');
|
||||
$this->Auth->authorize = 'controller';
|
||||
|
||||
$this->Auth->autoRedirect = false;
|
||||
|
||||
if($this->RequestHandler->isAjax()) {
|
||||
Configure::write('debug', 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ class UsersController extends AppController {
|
|||
|
||||
|
||||
/* Auth Cookie code from http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/ */
|
||||
//– code inside this function will execute only when autoRedirect was set to false (i.e. in a beforeFilter).
|
||||
//– code inside this function will execute only when autoRedirect
|
||||
//was set to false (i.e. in a beforeFilter).
|
||||
if ($this->Auth->user()) {
|
||||
if (!empty($this->data) && $this->data['User']['remember_me']) {
|
||||
$cookie = array();
|
||||
|
|
|
|||
Loading…
Reference in a new issue