1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 10:44:20 +02:00

[feature/oauth] Start linking/registering OAuth accounts during login

PHPBB3-11673
This commit is contained in:
Joseph Warner
2013-07-24 13:46:33 -04:00
parent 669586c134
commit 581cb37b8c
4 changed files with 30 additions and 1 deletions

View File

@@ -970,6 +970,21 @@ class phpbb_auth
);
}
// If the auth provider wants us to link an empty account do so and redirect
if ($login['status'] == LOGIN_SUCCESS_LINK_PROFILE)
{
// If this status exists a fourth field is in the $login array called 'redirect_data'
// This data is passed along as GET data to the next page allow the account to be linked
$url = 'ucp.php?mode=login_link';
foreach ($login['redirect_data'] as $key => $value)
{
$url .= '&' . $key . '=' . $value;
}
redirect($url);
}
// If login succeeded, we will log the user in... else we pass the login array through...
if ($login['status'] == LOGIN_SUCCESS)
{