Re: Auth variables being ignored

2010-06-23 Thread Jeremy Burns | Class Outfit
I was making a stupid mistake. For the record, I was calling 
parent::beforeFilter(), which was overriding my values.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 23 Jun 2010, at 08:55, Jeremy Burns wrote:

> I have a site built on 1.3.2 with the following app_controller.php
> file:
> 
>   class AppController extends Controller {
> 
>   var $components = array('Auth', 'Session');
> 
>   var $helpers = array('Html', 'Form', 'Session', 'Text');
> 
>   function beforeFilter() {
> 
>   parent::beforeFilter();
> 
>   $this->Auth->loginError = "You have entered the wrong 
> username or
> password.";
>   $this->Auth->authError = "You do not have permission to 
> access that
> page.";
>   $this->Auth->logoutRedirect = array('controller' => 
> 'pages',
> 'action' => 'home');
> 
>   }
> 
>   }
> 
> When a login fails I get the standard error message ("Login failed.
> Invalid username or password.") so it appears that the settings in
> app_controller are being ignored. I have also added other variables
> such as logoutRedirect and they are being ignored too.
> 
> Any ideas?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Auth variables being ignored

2010-06-23 Thread Jeremy Burns
I have a site built on 1.3.2 with the following app_controller.php
file:

class AppController extends Controller {

var $components = array('Auth', 'Session');

var $helpers = array('Html', 'Form', 'Session', 'Text');

function beforeFilter() {

parent::beforeFilter();

$this->Auth->loginError = "You have entered the wrong 
username or
password.";
$this->Auth->authError = "You do not have permission to 
access that
page.";
$this->Auth->logoutRedirect = array('controller' => 
'pages',
'action' => 'home');

}

}

When a login fails I get the standard error message ("Login failed.
Invalid username or password.") so it appears that the settings in
app_controller are being ignored. I have also added other variables
such as logoutRedirect and they are being ignored too.

Any ideas?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en