src/Mouf/Security/UserService/UserService.php
public function isLogged()
    {
        $this->byPassIsLogged = true;
        try {
            // Is a session mechanism available?
            if (!session_id()) {
                if ($this->sessionManager) {
                    $this->sessionManager->start();
                } else {
                    throw new MoufException("The session must be initialized before checking if the user is logged. Please use session_start().");
                }
            }
            
            if (isset($_SESSION[$this->sessionPrefix.'MoufUserId'])) {
                return true;
            } else {
                foreach ($this->authProviders as $provider) {
                    /* @var $provider AuthenticationProviderInterface */
                    if ($provider->isLogged($this)) {
                        return true;
                    }
                }
            }
        } catch (\Exception $e) {
            $this->byPassIsLogged = false;
            throw $e;
        }
        $this->byPassIsLogged = false;
        return false;
    }
public function isLogged()
    {
        $this->byPassIsLogged = true;
        try {
            // Is a session mechanism available?
            if (!session_id()) {
                if ($this->sessionManager) {
                    $this->sessionManager->start();
                } else {
                    throw new MoufException("The session must be initialized before checking if the user is logged. Please use session_start().");
                }
            }
            
            if (isset($_SESSION[$this->sessionPrefix.'MoufUserId'])) {
                return true;
            } else {
                foreach ($this->authProviders as $provider) {
                    /* @var $provider AuthenticationProviderInterface */
                    if ($provider->isLogged($this)) {
                        return true;
                    }
                }
            }
        } catch (\Exception $e) {
            $this->byPassIsLogged = false;
            throw $e;
        }
        $this->byPassIsLogged = false;
        return false;
    }
public function isLogged ( ) { $ this -> byPassIsLogged = true ; try { // Is a session mechanism available? if ( ! session_id ( ) ) { if ( $ this -> sessionManager ) { $ this -> sessionManager -> start ( ) ; } else { throw new MoufException ( "The session must be initialized before checking if the user is logged. Please use session_start()." ) ; } } if ( isset ( $ _SESSION [ $ this -> sessionPrefix . 'MoufUserId' ] ) ) { return true ; } else { foreach ( $ this -> authProviders as $ provider ) { /* @var $provider AuthenticationProviderInterface */ if ( $ provider -> isLogged ( $ this ) ) { return true ; } } } } catch ( \ Exception $ e ) { $ this -> byPassIsLogged = false ; throw $ e ; } $ this -> byPassIsLogged = false ; return false ; }
Returns "true" if the user is logged, "false" otherwise.

@return boolean
Returns true if the user is logged false otherwise .