public function logout()
    {
        if (false === $this->isEnabled()) {
            throw new UserInactiveException();
        }

        $this->publish(
            new UserLoggedOut(
                $this->id,
                $this->email
            )
        );
    }
public function logout()
    {
        if (false === $this->isEnabled()) {
            throw new UserInactiveException();
        }

        $this->publish(
            new UserLoggedOut(
                $this->id,
                $this->email
            )
        );
    }
public function logout ( ) { if ( false === $ this -> isEnabled ( ) ) { throw new UserInactiveException ( ) ; } $ this -> publish ( new UserLoggedOut ( $ this -> id , $ this -> email ) ) ; }
Updated the user state after logout.

@throws UserInactiveException when the user is not enabled
Updated the user state after logout .