1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-23 01:51:31 +02:00

[feature/oauth] Update link_account to allow for two methods of linking

PHPBB3-11673
This commit is contained in:
Joseph Warner
2013-08-14 15:35:37 -04:00
parent ce387d9bfc
commit afebbf231a
3 changed files with 19 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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);