diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-24 13:46:33 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-24 13:46:33 -0400 |
commit | 581cb37b8c7ae4f1902cfd6114a34ce1510139a8 (patch) | |
tree | aae7b4d463c7c64ad0e2ac0528b41961abce3b8e /phpBB/phpbb/auth/auth.php | |
parent | 669586c134641b29a95faa43090df124b59d4e14 (diff) | |
download | forums-581cb37b8c7ae4f1902cfd6114a34ce1510139a8.tar forums-581cb37b8c7ae4f1902cfd6114a34ce1510139a8.tar.gz forums-581cb37b8c7ae4f1902cfd6114a34ce1510139a8.tar.bz2 forums-581cb37b8c7ae4f1902cfd6114a34ce1510139a8.tar.xz forums-581cb37b8c7ae4f1902cfd6114a34ce1510139a8.zip |
[feature/oauth] Start linking/registering OAuth accounts during login
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb/auth/auth.php')
-rw-r--r-- | phpBB/phpbb/auth/auth.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/phpBB/phpbb/auth/auth.php b/phpBB/phpbb/auth/auth.php index 279959974d..400f5fef6d 100644 --- a/phpBB/phpbb/auth/auth.php +++ b/phpBB/phpbb/auth/auth.php @@ -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) { |