Neos.Neos/Classes/Domain/Service/UserService.php
public function getCurrentUser()
    {
        if ($this->securityContext->canBeInitialized() === true) {
            $account = $this->securityContext->getAccount();
            if ($account !== null) {
                return $this->getUser($account->getAccountIdentifier());
            }
        }

        return null;
    }
public function getCurrentUser()
    {
        if ($this->securityContext->canBeInitialized() === true) {
            $account = $this->securityContext->getAccount();
            if ($account !== null) {
                return $this->getUser($account->getAccountIdentifier());
            }
        }

        return null;
    }
public function getCurrentUser ( ) { if ( $ this -> securityContext -> canBeInitialized ( ) === true ) { $ account = $ this -> securityContext -> getAccount ( ) ; if ( $ account !== null ) { return $ this -> getUser ( $ account -> getAccountIdentifier ( ) ) ; } } return null ; }
Returns the currently logged in user, if any

@return User The currently logged in user, or null
@api
Returns the currently logged in user if any