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;
$usery->save();
}