lib/private/User/Session.php
/**
	 * logout the user from the session
	 */
logout the user from the session
logout the user from the session
public function logout() {
		$this->manager->emit('\OC\User', 'logout');
		$user = $this->getUser();
		if (!is_null($user)) {
			try {
				$this->tokenProvider->invalidateToken($this->session->getId());
			} catch (SessionNotAvailableException $ex) {
			}
		}
		$this->setUser(null);
		$this->setLoginName(null);
		$this->setToken(null);
		$this->unsetMagicInCookie();
		$this->session->clear();
		$this->manager->emit('\OC\User', 'postLogout');
	}
public function logout ( ) { $ this -> manager -> emit ( '\OC\User' , 'logout' ) ; $ user = $ this -> getUser ( ) ; if ( ! is_null ( $ user ) ) { try { $ this -> tokenProvider -> invalidateToken ( $ this -> session -> getId ( ) ) ; } catch ( SessionNotAvailableException $ ex ) { } } $ this -> setUser ( null ) ; $ this -> setLoginName ( null ) ; $ this -> setToken ( null ) ; $ this -> unsetMagicInCookie ( ) ; $ this -> session -> clear ( ) ; $ this -> manager -> emit ( '\OC\User' , 'postLogout' ) ; }
logout the user from the session
logout the user from the session