Skip to content

Commit

Permalink
Renaming "flashLayout" to "flashElement" to be consistent with change…
Browse files Browse the repository at this point in the history
…s to Session component and helper

Signed-off-by: Mark Story <mark@mark-story.com>
  • Loading branch information
ADmad authored and markstory committed Oct 17, 2009
1 parent 7b1d216 commit 4d44477
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cake/libs/controller/components/auth.php
Expand Up @@ -80,12 +80,12 @@ class AuthComponent extends Object {
var $ajaxLogin = null;

/**
* The name of the layout element used on Session::setFlash
* The name of the element used for SessionComponent::setFlash
*
* @var string
* @access public
*/
var $flashLayout = 'default';
var $flashElement = 'default';

/**
* The name of the model that represents users which will be authenticated. Defaults to 'User'.
Expand Down Expand Up @@ -361,13 +361,13 @@ function startup(&$controller) {
}
}

$this->Session->setFlash($this->loginError, $this->flashLayout, array(), 'auth');
$this->Session->setFlash($this->loginError, $this->flashElement, array(), 'auth');
$controller->data[$model->alias][$this->fields['password']] = null;
return false;
} else {
if (!$this->user()) {
if (!$this->RequestHandler->isAjax()) {
$this->Session->setFlash($this->authError, $this->flashLayout, array(), 'auth');
$this->Session->setFlash($this->authError, $this->flashElement, array(), 'auth');
if (!empty($controller->params['url']) && count($controller->params['url']) >= 2) {
$query = $controller->params['url'];
unset($query['url'], $query['ext']);
Expand Down Expand Up @@ -431,7 +431,7 @@ function startup(&$controller) {
return true;
}

$this->Session->setFlash($this->authError, $this->flashLayout, array(), 'auth');
$this->Session->setFlash($this->authError, $this->flashElement, array(), 'auth');
$controller->redirect($controller->referer(), null, true);
return false;
}
Expand Down

0 comments on commit 4d44477

Please sign in to comment.