public function initialize()
    {
        if ($this->checkAuthentication()) {
            $data = $this->getAuthenticationData();
            if (!isset($data['user_id'])) {
                return false;
            }

            $user = $this->toolkit->getRepository($this->userClassName)->getById($data['user_id']);
            if (!$user) {
                $this->setAuthenticated(false);
                $this->setAuthenticationData([]);
                return false;
            }
            $this->setUser($user);
            return true;
        }
        return false;
    }
public function initialize()
    {
        if ($this->checkAuthentication()) {
            $data = $this->getAuthenticationData();
            if (!isset($data['user_id'])) {
                return false;
            }

            $user = $this->toolkit->getRepository($this->userClassName)->getById($data['user_id']);
            if (!$user) {
                $this->setAuthenticated(false);
                $this->setAuthenticationData([]);
                return false;
            }
            $this->setUser($user);
            return true;
        }
        return false;
    }
public function initialize ( ) { if ( $ this -> checkAuthentication ( ) ) { $ data = $ this -> getAuthenticationData ( ) ; if ( ! isset ( $ data [ 'user_id' ] ) ) { return false ; } $ user = $ this -> toolkit -> getRepository ( $ this -> userClassName ) -> getById ( $ data [ 'user_id' ] ) ; if ( ! $ user ) { $ this -> setAuthenticated ( false ) ; $ this -> setAuthenticationData ( [ ] ) ; return false ; } $ this -> setUser ( $ user ) ; return true ; } return false ; }
Initialize the authentication, picking up on session data if possible.

@return bool
Initialize the authentication picking up on session data if possible .