public function getCurrentUser()
    {
        if ($this->currentuser === null) {
            $this->currentuser = $this->app['session']->isStarted() ? $this->app['session']->get('authentication') : null;
            if ($this->currentuser instanceof AccessControl\Token\Token) {
                $this->currentuser = $this->currentuser->getUser()->toArray();
            }
        }

        return $this->currentuser;
    }
public function getCurrentUser()
    {
        if ($this->currentuser === null) {
            $this->currentuser = $this->app['session']->isStarted() ? $this->app['session']->get('authentication') : null;
            if ($this->currentuser instanceof AccessControl\Token\Token) {
                $this->currentuser = $this->currentuser->getUser()->toArray();
            }
        }

        return $this->currentuser;
    }
public function getCurrentUser ( ) { if ( $ this -> currentuser === null ) { $ this -> currentuser = $ this -> app [ 'session' ] -> isStarted ( ) ? $ this -> app [ 'session' ] -> get ( 'authentication' ) : null ; if ( $ this -> currentuser instanceof AccessControl \ Token \ Token ) { $ this -> currentuser = $ this -> currentuser -> getUser ( ) -> toArray ( ) ; } } return $ this -> currentuser ; }
Get the current user as an array.

@return array
Get the current user as an array .