src/PHPDish/Bundle/UserBundle/Security/Core/User/FOSUBUserProvider.php
protected function generateUsername(UserResponseInterface $response)
    {
        $username = $response->getNickname();

        return $this->userManager->findUserByUsername($username)
            ? $username.$response->getUsername()
            : $username;
    }
protected function generateUsername(UserResponseInterface $response)
    {
        $username = $response->getNickname();

        return $this->userManager->findUserByUsername($username)
            ? $username.$response->getUsername()
            : $username;
    }
生成用户名.

@param UserResponseInterface $response

@return string