Fixed remember me cookie on login
This commit is contained in:
parent
47c9cf2ba5
commit
7b2180821c
|
|
@ -16,7 +16,9 @@ class AppController extends Controller {
|
||||||
$this->Auth->allow('display');
|
$this->Auth->allow('display');
|
||||||
$this->Auth->authorize = 'controller';
|
$this->Auth->authorize = 'controller';
|
||||||
|
|
||||||
if($this->RequestHandler->isAjax()) {
|
$this->Auth->autoRedirect = false;
|
||||||
|
|
||||||
|
if($this->RequestHandler->isAjax()) {
|
||||||
Configure::write('debug', 0);
|
Configure::write('debug', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,4 +149,4 @@ class AppController extends Controller {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,8 @@ class UsersController extends AppController {
|
||||||
|
|
||||||
|
|
||||||
/* Auth Cookie code from http://www.webdevelopment2.com/cakephp-auth-component-tutorial-3/ */
|
/* 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 ($this->Auth->user()) {
|
||||||
if (!empty($this->data) && $this->data['User']['remember_me']) {
|
if (!empty($this->data) && $this->data['User']['remember_me']) {
|
||||||
$cookie = array();
|
$cookie = array();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue