Hello Guys,
I am somewhat new to developing with CakePHP. My application is at a
good point right now, but some strange behavior started happening.
I have this form on a modal dialog, since it have file upload, I can't
send it via ajax, so I submit to a iframe.
Since I activated the Auth component (and it was working fine), I
started to get a strange behavior from this form and the Auth
component.
When I submit the form to the iframe (form action is controller/
uploadImage and the form target is 'iframeuploadtarget'),
the app_controller loads the Auth component, and the component tries
to read the user from the session but it returns false (I am logged n)
and then redirect the user to the login action (usuarios/login)
Inside the login action, I have the following code:
if ($this->Session->read($this->Auth->sessionKey)) {
$Usuario = $this->Session->read($this->Auth->sessionKey);
$GrupoUsuario = $this->Usuario->GrupoUsuario->find('first',
array('conditions' => array('GrupoUsuario.id' =>
$Usuario['grupo_usuario_id'])));
$this->Session->write('GrupoUsuario', $GrupoUsuario);
return $this->redirect($this->Auth->redirect());
}
But the strange thing is: inside this login action IT DOES FIND the
user in the session, and the redirects it to the default controller/
action.
I really don't know what could be happening... can anyone please help
me?
Thanks in advance.
Paul.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php