public function clearIdentity()
    {
        if ($user = $this->getIdentity()) {
            $auth = $this->authenticationProvider->findByUserId($user->getId());
            $this->resetAuthenticationKey($auth);
        }

        $sp = session_get_cookie_params();
        foreach ([self::COOKIE_USER, self::COOKIE_VERIFY_A, self::COOKIE_VERIFY_B] as $cookieName) {
            setcookie($cookieName, null, null, '/', $sp['domain'], false, true);
        }

        $this->identity = null;
    }
public function clearIdentity()
    {
        if ($user = $this->getIdentity()) {
            $auth = $this->authenticationProvider->findByUserId($user->getId());
            $this->resetAuthenticationKey($auth);
        }

        $sp = session_get_cookie_params();
        foreach ([self::COOKIE_USER, self::COOKIE_VERIFY_A, self::COOKIE_VERIFY_B] as $cookieName) {
            setcookie($cookieName, null, null, '/', $sp['domain'], false, true);
        }

        $this->identity = null;
    }
public function clearIdentity ( ) { if ( $ user = $ this -> getIdentity ( ) ) { $ auth = $ this -> authenticationProvider -> findByUserId ( $ user -> getId ( ) ) ; $ this -> resetAuthenticationKey ( $ auth ) ; } $ sp = session_get_cookie_params ( ) ; foreach ( [ self :: COOKIE_USER , self :: COOKIE_VERIFY_A , self :: COOKIE_VERIFY_B ] as $ cookieName ) { setcookie ( $ cookieName , null , null , '/' , $ sp [ 'domain' ] , false , true ) ; } $ this -> identity = null ; }
Logout.  Reset the user authentication key, and delete all cookies.
Logout . Reset the user authentication key and delete all cookies .