1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-11 01:55:24 +02:00

[feature/oauth] Token must be updated with the user_id

PHPBB3-11673
This commit is contained in:
Joseph Warner 2013-07-24 12:55:43 -04:00
parent 58d5820069
commit 669586c134

View File

@ -171,8 +171,8 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
if (!$row) if (!$row)
{ {
// Account not tied to any existing account // The user does not yet exist, ask if they wish to register the account
// TODO: determine action that should occur throw new Exception($unique_id);
} }
// Retrieve the user's account // 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); 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 // The user is now authenticated and can be logged in
return array( return array(
'status' => LOGIN_SUCCESS, 'status' => LOGIN_SUCCESS,