aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-04-07 10:58:33 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-04-07 10:58:33 +0200
commit3f60759a495645bbbf16121d94f426f2437eddac (patch)
tree0f306003892e036337b7367a5e395e7602629dbf /phpBB/phpbb/auth
parent21791971aab85db0257088f0dfe8f79a5552a5e7 (diff)
parentca7d63d4d76c19125dbbfb53066b77c6149d6dad (diff)
downloadforums-3f60759a495645bbbf16121d94f426f2437eddac.tar
forums-3f60759a495645bbbf16121d94f426f2437eddac.tar.gz
forums-3f60759a495645bbbf16121d94f426f2437eddac.tar.bz2
forums-3f60759a495645bbbf16121d94f426f2437eddac.tar.xz
forums-3f60759a495645bbbf16121d94f426f2437eddac.zip
Merge pull request #5554 from 3D-I/ticket/16001
[ticket/16001] Append data to the OAuth's redirect URL
Diffstat (limited to 'phpBB/phpbb/auth')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 3e9b424e8d..c7ebd1fb7f 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -221,24 +221,33 @@ class oauth extends \phpbb\auth\provider\base
'provider' => $service_name_original,
'oauth_provider_id' => $unique_id
);
+
$sql = 'SELECT user_id FROM ' . $this->auth_provider_oauth_token_account_assoc . '
WHERE ' . $this->db->sql_build_array('SELECT', $data);
$result = $this->db->sql_query($sql);
$row = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
+ $redirect_data = array(
+ 'auth_provider' => 'oauth',
+ 'login_link_oauth_service' => $service_name_original,
+ );
+
/**
* Event is triggered before check if provider is already associated with an account
*
* @event core.oauth_login_after_check_if_provider_id_has_match
- * @var array row User row
- * @var array data Provider data
- * @var \OAuth\Common\Service\ServiceInterface service OAuth service
+ * @var array row User row
+ * @var array data Provider data
+ * @var array redirect_data Data to be appended to the redirect url
+ * @var \OAuth\Common\Service\ServiceInterface service OAuth service
* @since 3.2.3-RC1
+ * @changed 3.2.6-RC1 Added redirect_data
*/
$vars = array(
'row',
'data',
+ 'redirect_data',
'service',
);
extract($this->dispatcher->trigger_event('core.oauth_login_after_check_if_provider_id_has_match', compact($vars)));
@@ -250,10 +259,7 @@ class oauth extends \phpbb\auth\provider\base
'status' => LOGIN_SUCCESS_LINK_PROFILE,
'error_msg' => 'LOGIN_OAUTH_ACCOUNT_NOT_LINKED',
'user_row' => array(),
- 'redirect_data' => array(
- 'auth_provider' => 'oauth',
- 'login_link_oauth_service' => $service_name_original,
- ),
+ 'redirect_data' => $redirect_data,
);
}