diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-08-14 15:35:37 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-08-14 15:36:20 -0400 |
commit | afebbf231adeee6828d75d346b64f3036ff46e7c (patch) | |
tree | 46d1b76e89d0a12b33ec148a10d2469372813694 /phpBB/includes/ucp | |
parent | ce387d9bfc2b4a5ac18f79585132862ced0a7687 (diff) | |
download | forums-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.php | 5 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_login_link.php | 3 |
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); |