public function getLoggedInUser($mapperName = \Tx_Oelib_Mapper_FrontEndUser::class)
    {
        if ($mapperName === '') {
            throw new \InvalidArgumentException('$mapperName must not be empty.', 1331488730);
        }
        if (!$this->isLoggedIn()) {
            return null;
        }

        if ($this->loggedInUser !== null) {
            $user = $this->loggedInUser;
        } else {
            /** @var \Tx_Oelib_Mapper_FrontEndUser $mapper */
            $mapper = \Tx_Oelib_MapperRegistry::get($mapperName);
            /** @var \Tx_Oelib_Model_FrontEndUser $user */
            $user = $mapper->find($this->getFrontEndController()->fe_user->user['uid']);
        }

        return $user;
    }
public function getLoggedInUser($mapperName = \Tx_Oelib_Mapper_FrontEndUser::class)
    {
        if ($mapperName === '') {
            throw new \InvalidArgumentException('$mapperName must not be empty.', 1331488730);
        }
        if (!$this->isLoggedIn()) {
            return null;
        }

        if ($this->loggedInUser !== null) {
            $user = $this->loggedInUser;
        } else {
            /** @var \Tx_Oelib_Mapper_FrontEndUser $mapper */
            $mapper = \Tx_Oelib_MapperRegistry::get($mapperName);
            /** @var \Tx_Oelib_Model_FrontEndUser $user */
            $user = $mapper->find($this->getFrontEndController()->fe_user->user['uid']);
        }

        return $user;
    }
public function getLoggedInUser ( $ mapperName = \ Tx_Oelib_Mapper_FrontEndUser :: class ) { if ( $ mapperName === '' ) { throw new \ InvalidArgumentException ( '$mapperName must not be empty.' , 1331488730 ) ; } if ( ! $ this -> isLoggedIn ( ) ) { return null ; } if ( $ this -> loggedInUser !== null ) { $ user = $ this -> loggedInUser ; } else { /** @var \Tx_Oelib_Mapper_FrontEndUser $mapper */ $ mapper = \ Tx_Oelib_MapperRegistry :: get ( $ mapperName ) ; /** @var \Tx_Oelib_Model_FrontEndUser $user */ $ user = $ mapper -> find ( $ this -> getFrontEndController ( ) -> fe_user -> user [ 'uid' ] ) ; } return $ user ; }
Gets the currently logged-in front-end user.

@param string $mapperName the name of the mapper to use for getting the front-end user model, must not be empty

@return \Tx_Oelib_Model_FrontEndUser the logged-in front-end user, will
be NULL if no user is logged in or
if there is no front end
Gets the currently logged - in front - end user .