diff options
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth/oauth.php')
-rw-r--r-- | phpBB/phpbb/auth/provider/oauth/oauth.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index 0762e202db..90ce1f8f5a 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -171,8 +171,8 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base if (!$row) { - // Account not tied to any existing account - // TODO: determine action that should occur + // The user does not yet exist, ask if they wish to register the account + throw new Exception($unique_id); } // Retrieve the user's account @@ -189,6 +189,9 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base throw new Exception('Invalid entry in ' . $this->auth_provider_oauth_token_account_assoc); } + // Update token storage to store the user_id + $storage->set_user_id($row['user_id']); + // The user is now authenticated and can be logged in return array( 'status' => LOGIN_SUCCESS, |