aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-08-14 15:35:37 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-08-14 15:36:20 -0400
commitafebbf231adeee6828d75d346b64f3036ff46e7c (patch)
tree46d1b76e89d0a12b33ec148a10d2469372813694 /phpBB/includes/ucp
parentce387d9bfc2b4a5ac18f79585132862ced0a7687 (diff)
downloadforums-afebbf231adeee6828d75d346b64f3036ff46e7c.tar
forums-afebbf231adeee6828d75d346b64f3036ff46e7c.tar.gz
forums-afebbf231adeee6828d75d346b64f3036ff46e7c.tar.bz2
forums-afebbf231adeee6828d75d346b64f3036ff46e7c.tar.xz
forums-afebbf231adeee6828d75d346b64f3036ff46e7c.zip
[feature/oauth] Update link_account to allow for two methods of linking
PHPBB3-11673
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_auth_link.php5
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php3
2 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_auth_link.php b/phpBB/includes/ucp/ucp_auth_link.php
index 213fbfdbb5..43d69be901 100644
--- a/phpBB/includes/ucp/ucp_auth_link.php
+++ b/phpBB/includes/ucp/ucp_auth_link.php
@@ -54,7 +54,10 @@ class ucp_auth_link
// The current user_id is also necessary
$link_data['user_id'] = $user->data['user_id'];
- if ($request->variable('link', false, false, phpbb_request_interface::POST))
+ // Tell the provider that the method is auth_link not login_link
+ $link_data['link_method'] = 'auth_link';
+
+ if ($request->variable('link', null))
{
$error[] = $auth_provider->link_account($link_data);
}
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
index 9f2fa6330a..b09415623b 100644
--- a/phpBB/includes/ucp/ucp_login_link.php
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -73,6 +73,9 @@ class ucp_login_link
// Give the user_id to the data
$data['user_id'] = $login_result['user_row']['user_id'];
+ // Set the link_method to login_link
+ $data['link_method'] = 'login_link';
+
// The user is now logged in, attempt to link the user to the external account
$result = $auth_provider->link_account($data);