src/Mouf/Security/UserService/UserService.php
public function logoff()
    {
        // Is a session mechanism available?
        if (!session_id()) {
            if ($this->sessionManager) {
                $this->sessionManager->start();
            } else {
                throw new MoufException("The session must be initialized before trying to login. Please use session_start().");
            }
        }
        
        if (isset($_SESSION[$this->sessionPrefix.'MoufUserLogin'])) {
            $login = $_SESSION[$this->sessionPrefix.'MoufUserLogin'];
            if (is_array($this->authenticationListeners)) {
                foreach ($this->authenticationListeners as $listener) {
                    $listener->beforeLogOut($this);
                }
            }
            if ($this->log instanceof LoggerInterface) {
                $this->log->debug("User '{login}' logs out.", array('login' => $login));
            } else {
                $this->log->trace("User '".$login."' logs out.");
            }
            unset($_SESSION[$this->sessionPrefix.'MoufUserId']);
            unset($_SESSION[$this->sessionPrefix.'MoufUserLogin']);
        }
    }
public function logoff()
    {
        // Is a session mechanism available?
        if (!session_id()) {
            if ($this->sessionManager) {
                $this->sessionManager->start();
            } else {
                throw new MoufException("The session must be initialized before trying to login. Please use session_start().");
            }
        }
        
        if (isset($_SESSION[$this->sessionPrefix.'MoufUserLogin'])) {
            $login = $_SESSION[$this->sessionPrefix.'MoufUserLogin'];
            if (is_array($this->authenticationListeners)) {
                foreach ($this->authenticationListeners as $listener) {
                    $listener->beforeLogOut($this);
                }
            }
            if ($this->log instanceof LoggerInterface) {
                $this->log->debug("User '{login}' logs out.", array('login' => $login));
            } else {
                $this->log->trace("User '".$login."' logs out.");
            }
            unset($_SESSION[$this->sessionPrefix.'MoufUserId']);
            unset($_SESSION[$this->sessionPrefix.'MoufUserLogin']);
        }
    }
public function logoff ( ) { // Is a session mechanism available? if ( ! session_id ( ) ) { if ( $ this -> sessionManager ) { $ this -> sessionManager -> start ( ) ; } else { throw new MoufException ( "The session must be initialized before trying to login. Please use session_start()." ) ; } } if ( isset ( $ _SESSION [ $ this -> sessionPrefix . 'MoufUserLogin' ] ) ) { $ login = $ _SESSION [ $ this -> sessionPrefix . 'MoufUserLogin' ] ; if ( is_array ( $ this -> authenticationListeners ) ) { foreach ( $ this -> authenticationListeners as $ listener ) { $ listener -> beforeLogOut ( $ this ) ; } } if ( $ this -> log instanceof LoggerInterface ) { $ this -> log -> debug ( "User '{login}' logs out." , array ( 'login' => $ login ) ) ; } else { $ this -> log -> trace ( "User '" . $ login . "' logs out." ) ; } unset ( $ _SESSION [ $ this -> sessionPrefix . 'MoufUserId' ] ) ; unset ( $ _SESSION [ $ this -> sessionPrefix . 'MoufUserLogin' ] ) ; } }
Logs the user off.
Logs the user off .