Hi guys,
after spending some more time I solved my problem with authError and
loginError messages of the Auth component only displaying in the
default language.
Just in case somebody has the same problem I post the solution. :-)
This is my app_controller.php file where only the L10n part and the
messages are of interest:
uses('L10n');
class AppController extends Controller {
var $components = array('Auth');
function beforeFilter() {
$this->L10n = new L10n();
$this->L10n->get($this->Session->read('Config.language'));
if (isset($this->Auth)) {
$this->Auth->fields = array('username' => 'email',
'password' =>
'password');
$this->Auth->userScope = array('activated' => 1);
$this->Auth->loginAction = array('controller' =>
'users', 'action'
=> 'login');
$this->Auth->loginRedirect = array('controller' =>
'pages',
'action' => 'display', 'home');
$this->Auth->logoutRedirect = array('controller' =>
'users',
'action' => 'login', 'admin' => false);
$this->Auth->loginError = __('auth_loginerror', true);
$this->Auth->authError = __('auth_autherror', true);
$this->Auth->autoRedirect = true;
$this->Auth->authorize = 'controller';
}
}
function isAuthorized() {
return true;
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---