src/PHPDish/Bundle/UserBundle/Security/Core/User/FOSUBUserProvider.php
protected function getAuthenticatedUser()
    {
        return ($token = $this->tokenStorage->getToken())
            ? ($token->getUser() instanceof UserInterface ? $token->getUser() : null)
            : null;
    }
protected function getAuthenticatedUser()
    {
        return ($token = $this->tokenStorage->getToken())
            ? ($token->getUser() instanceof UserInterface ? $token->getUser() : null)
            : null;
    }
获取当前登录的用户
@return UserInterface