This doesn't work with AJAX as it uses the beforeRedirect() method callback
to process logic.
You can save the cookie yourself though: $this->AutoLogin->save($username,
$password);
-Miles
On Monday, March 26, 2012 5:01:41 AM UTC-7, heohni wrote:
>
> Hi,
>
> I downloaded the version 3.4.
> I added the checkbox echo $this->Form->input('auto_login', array('label'
> => __('Stay'), 'value' => 1, 'type' => 'checkbox', 'div' =>
> 'checkbox'));
> I added the component to my appController.
>
> But I use a ajax validation for my login popup and it looks like this:
>
> public function login() {
>if($this->request->isAjax()){
> if ($this->Auth->login()) {
>// log last visit
>// return 'OK' to ajax call
> }else{
> // validation failed
>
> I don't understand at what point the component is called and does its work
> to create the cookie?
>
> What do i miss?
>
--
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php