OAuth/UserProvider.php
protected function createUniqueUsername( $username )
    {
        $originalName = $username;
        $existingUser = $this->userManager->findUserByUsername( $username );
        $suffix = 0;
        while ( $existingUser )
        {
            $suffix++;
            $username = $originalName . $suffix;
            $existingUser = $this->userManager->findUserByUsername( $username );
        }
        return $username;
    }
protected function createUniqueUsername( $username )
    {
        $originalName = $username;
        $existingUser = $this->userManager->findUserByUsername( $username );
        $suffix = 0;
        while ( $existingUser )
        {
            $suffix++;
            $username = $originalName . $suffix;
            $existingUser = $this->userManager->findUserByUsername( $username );
        }
        return $username;
    }
protected function createUniqueUsername ( $ username ) { $ originalName = $ username ; $ existingUser = $ this -> userManager -> findUserByUsername ( $ username ) ; $ suffix = 0 ; while ( $ existingUser ) { $ suffix ++ ; $ username = $ originalName . $ suffix ; $ existingUser = $ this -> userManager -> findUserByUsername ( $ username ) ; } return $ username ; }
Ensures uniqueness of username

@param string $username
@return string
Ensures uniqueness of username