$this->Auth->loginAction = 'members/login'; not works

Dear All

I try to change the default users/login to members/login.

I have aded the $this->Auth->loginAction = 'Members/login'; to appController beforeFilter() like:

class AppController extends Controller {

var $components = array('auth');

function beforeFilter() {

if (isset($this->auth)) {

$this->Auth->loginAction = 'Members/login';

}

}

}

but if I call the main site the redirect goes again to users/login and not to members/login, why, is it a bug?

Thanks

Asked by saschaappel, on 30/12/09

Hi thanks

But I found out the problem

var $components = array('auth'); is case sensitivity

var $components = array('Auth'); works, unbelievable...

saschaappel - on 31/12/09

<< comments | comments >>

2 Answers

Set your loginAction as an array:


$this->Auth->loginAction = array('controller' => 'Members', 'action' => 'login');

Answered by predominanton 30/12/09

-1DownUp

Try without if statment.

Answered by atleton 30/12/09

<< previous next >>

Your Answer

You can use Creole Wiki Syntax to format your text.

Tagged with

Rating

1

Viewed

521 times

Last Activity

on 31/12/09