Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

why phalcon cannot reset cookies

this is my code, set cookie and reset cookie use it,but when call it ´╝îits just database data changes?help me !!

public function rememberMe(UserUsers $user){
        $salt = 'GYHZMFSWP';
        $identifier = md5($salt . md5($user->name . $salt));
        $permanent  = md5(uniqid(rand(), TRUE));

        $this->cookies->set('permanent',$permanent, time() + 15 * 86400);
        $this->cookies->set('identifier',$identifier, time() + 15 * 86400);

        $usery = UserUsers::findFirst( array("id = '".$user->id."'") );
        $usery->identifier = $identifier;
        $usery->permanent  = $permanent;

edited Apr '15


rememberMe is a controller action? You need to send cookies to client/browser.

Are you sure browser accept cookies from your backend/server/domain?