In meinen app-Controller definiert i alslogoutRedirect() funktioniert nicht in CakePHP
class AppController extends Controller {
public $components = array(
// 'DebugKit.Toolbar',
'Session',
'Auth' => array(
'loginRedirect' => array('controller' => 'admin_logins', 'action' => 'dashboard'),
'logoutRedirect' => array('controller' => 'admin_logins', 'action' => 'index'),
'authError' => 'You must be logged in to view this page.',
'loginError' => 'Invalid Username or Password entered, please try again.',
'authenticate' => array('Form' => array('fields' => array('username' => 'email', 'password' => 'password'))
)
));
..........
?>
Wenn Session-Timeout statt in admin_logins/index
die Umleitung es users/login
umleitet,
I logoutRedirect url innen beforeFilter()
in App gedruckt Controller wie unten
// only allow the login controllers only
public function beforeFilter() {
$this->Auth->authorize = 'Controller';
$this->Auth->allow('index');
pr($this->Auth->logoutRedirect); die;
}
Er druckt wie unten
Array
(
[controller] => admin_logins
[action] => index
)
Aber immer noch umgeleitet zu users/login
Kann jemand hier vorschlagen?