when I annotation this function my web is normal but when I logined then logout, and restart chrome its show 500 Internal Server Error? why?
> following is my function:
> public function cookiesLogin(){
> $salt = 'GYHZMFSWP';
> $permanent = $this->cookies->get('permanent')->getValue();
> $identifier = $this->cookies->get('identifier')->getValue();
>
> $remember=RememberTokens::findFirstByIdentifier($identifier); //find data
>
> if($permanent == $remember->permanent){ //check cookie to login then setsession
> if($identifier == md5($salt . md5($remember->getUser()->name .$salt))){
> if((time()-(86400*8))<$remember->createdAt){
> $user= Users::findFirstById($remember->userid );
> $this->regSessionAuth( $user );
> //reproduct cookie
> $this->rememberMe( $user );
> return true;
> }
> }
> }
>
> $this->cookies->get('permanent')->delete();
> $this->cookies->get('identifier')->delete();
> return false;
> }
>
>