aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth/provider
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/auth/provider')
-rw-r--r--phpBB/phpbb/auth/provider/interface.php5
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php10
2 files changed, 14 insertions, 1 deletions
diff --git a/phpBB/phpbb/auth/provider/interface.php b/phpBB/phpbb/auth/provider/interface.php
index f4344c1dc7..9cee63abeb 100644
--- a/phpBB/phpbb/auth/provider/interface.php
+++ b/phpBB/phpbb/auth/provider/interface.php
@@ -45,6 +45,11 @@ interface phpbb_auth_provider_interface
* 'error_msg' => string
* 'user_row' => array
* )
+ * A fourth key of the array may be present 'redirect_data'
+ * This key is only used when 'status' is equal to
+ * LOGIN_SUCCESS_LINK_PROFILE and it's value is an
+ * associative array that is turned into GET variables on
+ * the redirect url.
*/
public function login($username, $password);
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 90ce1f8f5a..5fc940fade 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -172,7 +172,15 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
if (!$row)
{
// The user does not yet exist, ask if they wish to register the account
- throw new Exception($unique_id);
+ return array(
+ 'status' => LOGIN_SUCCESS_LINK_PROFILE,
+ 'error_msg' => 'LOGIN_OAUTH_ACCOUNT_NOT_LINKED',
+ 'user_row' => array(),
+ 'redirect_data' => array(
+ 'auth_provider' => 'oauth',
+ 'oauth_service' => $service_name_original,
+ ),
+ );
}
// Retrieve the user's account