I'm trying to create a login process for my website. Once you click
"login" and ajax call is been made to process the data. If
successfully I try to create a cookie to store the data:

// Create new key
$key = base64_encode(serialize(array($this->user->getUsername(), $this-
>user->getPassword())));

// Save remember_me to a cookie
$cookie = new Cookie($this->options['remember_me_cookie_name'], $key,
null, time() + $this->options['remember_me_cookie_lifetime']);

I have tried ether:

$this->response->headers->setCookie($cookie);

or

setcookie($cookie->getName(), $cookie->getValue(), $cookie-
>getExpire(), $cookie->getPath(), $cookie->getDomain(), $cookie-
>isSecure(), $cookie->isHttpOnly());

But once the page is reload (redirect to homepage) the cookie is gone.
Any ideas how to solve this issue?

Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to