diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-29 14:01:44 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-29 14:02:09 -0400 |
commit | 600c29e6ecc189aed1ba6b993c3fe79033285df1 (patch) | |
tree | f0711755aae55c8858ce74ce4b62dd58ab9383be | |
parent | ec160814b8bc21ab61314712660153b3f95eb7c9 (diff) | |
download | forums-600c29e6ecc189aed1ba6b993c3fe79033285df1.tar forums-600c29e6ecc189aed1ba6b993c3fe79033285df1.tar.gz forums-600c29e6ecc189aed1ba6b993c3fe79033285df1.tar.bz2 forums-600c29e6ecc189aed1ba6b993c3fe79033285df1.tar.xz forums-600c29e6ecc189aed1ba6b993c3fe79033285df1.zip |
[feature/oauth] Most of ucp page related to login option should be done now
PHPBB3-11673
-rw-r--r-- | phpBB/includes/ucp/ucp_login_link.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php index 18d07fb520..c2fc0fdfab 100644 --- a/phpBB/includes/ucp/ucp_login_link.php +++ b/phpBB/includes/ucp/ucp_login_link.php @@ -43,6 +43,10 @@ class ucp_login_link $login_link_error = $user->lang['LOGIN_LINK_NO_DATA_PROVIDED']; } + // Use the auth_provider requested even if different from configured + $auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']); + $auth_provider = $phpbb_container->get($auth_provider); + // Have the authentication provider check that all necessary data is available $result = $auth_provider->login_link_has_necessary_data($data); if ($result !== null) @@ -50,10 +54,6 @@ class ucp_login_link $login_link_error = $user->lang[$result]; } - // Use the auth_provider requested even if different from configured - $auth_provider = 'auth_provider.' . (array_key_exists('auth_provider', $data)) ? $data['auth_provider'] : $config['auth_method']; - $auth_provider = $phpbb_container->get($auth_provider); - // Perform link action if there is no error if (!$login_link_error) { @@ -72,6 +72,7 @@ class ucp_login_link $login_link_error = $user->lang[$result]; } else { // Perform a redirect as the account has been linked + $this->perform_redirect(); } } } @@ -120,7 +121,7 @@ class ucp_login_link { global $auth, $config, $request, $template, $user; $login_username = $request->variable('login_username', '', false, phpbb_request_interface::POST); - $login_password = $request->untrimmed_variable('password', '', true, phpbb_request_interface::POST); + $login_password = $request->untrimmed_variable('login_password', '', true, phpbb_request_interface::POST); $result = $auth->login($login_username, $login_password); @@ -174,4 +175,10 @@ class ucp_login_link return $login_error; } + + protected function perform_redirect() + { + // TODO: Make redirect to same page as login would have + redirect('index.php'); + } } |