Temat: Problem z helperem Session
No to zagwostka, w controllerze jak wywołuje var_dump($this->Session->read());
dostaje:
'Message' =>
array
'auth' =>
array
'message' => string 'No, you fool! That's not the right password!' (length=44)
'element' => string 'default' (length=7)
'params' =>
array
...
Natomiast pr($_SESSION) w layoucie zwraca mi:
[Message] => Array
(
)
[Auth] => Array
(
[redirect] => /account
)
i mała ciekawostka, jak wejde w /cake/libs/views/helpers/session.php
i zakomentuje w linii 158 - parent::delete('Message.' . $key); (metoda flash() )
To komunikat wyswietla mi się prawidłowo (oczywiście bez kasowania wpisu z sesji) i po pr($_SESSION) w layoucie mam:
[Message] => Array
(
[auth] => Array
(
[message] => No, you fool! That's not the right password!
[element] => default
[params] => Array
(
)
)
)
AppModel::beforeFilter() wyglada u mnie tak:
Security::setHash("md5");
$this->Auth->fields = array('username' => 'login', 'password' => 'password');
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->userScope = array('User.status' => array('confirmed','active','hidden'));
$this->Auth->authError = "Sorry, you are lacking access.";
$this->Auth->loginError = "No, you fool! That's not the right password!";
Any idea?