Hola, estoy utilizando acl para mi aplicacion y me estaba funcionando muy
bien hasta hace poco, cunado intento corres acceder al sistema siempre me
dice:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this
address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to
accept cookies.
esto es lo que tengo en el UsersController:
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('login');
}
function login()
{
if ($this->Auth->login())
{
$user= $this->User->find('first', array('conditions'
=>array('User.username' => $this->data['User']['username'])));
$user_id= $this->User->find('first', array('conditions' =>array('User.id'
=> $this->data['User']['id'])));
$this->loginRedirect();
}
}
Function loginRedirect()
{
if ($this->Auth->user('role_id') == 1)
{
$this->redirect(array ('controller' => 'users', 'action' =>
'admin'), null, true);
.
.
.
}else{
.
$this->redirect(array ('controller' => 'users', 'action' => 'add'),
null, true);
}
y en el AppController:
public $components = array(
'Acl',
'Auth' => array(
'authorize' => array(
'Actions' => array('actionPath' => 'controllers')
)
),
'Session' , 'LoadsysAuth'
);
public $helpers = array('Html', 'Form', 'Session');
public function beforeFilter() {
$this->Auth->loginRedirect = '/users/loginRedirect';
$this->Auth->allow('display');
}
alguien sabe que como solucionar este problema???
Muchas gracias de antemano..
--
Has recibido este mensaje porque estás suscrito al grupo "CakePHP-es" de Grupos
de Google.
Para ver este debate en la Web, visita
https://groups.google.com/d/msg/cakephp-es/-/uToTa8FgjjAJ.
Para publicar una entrada en este grupo, envía un correo electrónico a
[email protected].
Para anular tu suscripción a este grupo, envía un correo electrónico a
[email protected]
Para tener acceso a más opciones, visita el grupo en
http://groups.google.com/group/cakephp-es?hl=es.