public function logout()
    {
        $result = array();

        $user = $this->user->get($this->user->getId());
        $this->hook->attach('user.logout.before', $user, $result, $this);

        if (!empty($result)) {
            return (array) $result;
        }

        $this->session->delete();
        $result = $this->getResultLogOut($user);

        $this->hook->attach('user.logout.after', $user, $result, $this);
        return (array) $result;
    }
public function logout()
    {
        $result = array();

        $user = $this->user->get($this->user->getId());
        $this->hook->attach('user.logout.before', $user, $result, $this);

        if (!empty($result)) {
            return (array) $result;
        }

        $this->session->delete();
        $result = $this->getResultLogOut($user);

        $this->hook->attach('user.logout.after', $user, $result, $this);
        return (array) $result;
    }
public function logout ( ) { $ result = array ( ) ; $ user = $ this -> user -> get ( $ this -> user -> getId ( ) ) ; $ this -> hook -> attach ( 'user.logout.before' , $ user , $ result , $ this ) ; if ( ! empty ( $ result ) ) { return ( array ) $ result ; } $ this -> session -> delete ( ) ; $ result = $ this -> getResultLogOut ( $ user ) ; $ this -> hook -> attach ( 'user.logout.after' , $ user , $ result , $ this ) ; return ( array ) $ result ; }
Logs out the current user
@return array
Logs out the current user