aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-29 13:10:56 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-29 13:11:15 -0400
commitc09bda10fcf3fc7b84908bc15d86eca86b71f232 (patch)
tree9da80f0d7b14890f922702a113fb87b6b9753335 /phpBB/includes
parentbcdeafedd7178d27dcd0fafd4b22cddeaefc80b0 (diff)
downloadforums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar.gz
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar.bz2
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar.xz
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.zip
[feature/oauth] Properly check that all data needed is available
PHPBB3-11673
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
index 1b9b0e45cb..c99f162f1a 100644
--- a/phpBB/includes/ucp/ucp_login_link.php
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -33,7 +33,9 @@ class ucp_login_link
$auth_provider = $phpbb_container->get($auth_provider);
// Initialize necessary variables
+ $login_error = null;
$login_link_error = null;
+ $login_username = null;
// Build the data array
$data = $this->get_login_link_data_array();
@@ -45,10 +47,14 @@ class ucp_login_link
}
// Have the authentication provider check that all necessary data is available
-
+ $result = $auth_provider->login_link_has_necessary_data($data);
+ if ($result !== null)
+ {
+ $login_link_error = $user->lang[$result];
+ }
// Perform link action if there is no error
- if (!login_link_error)
+ if (!$login_link_error)
{
if ($request->is_set_post('login'))
{
@@ -143,7 +149,8 @@ class ucp_login_link
{
if (strpos($var_name, 'login_link_') === 0)
{
- $login_link_data[$var_name] = $request->variable($var_name, '', false, phpbb_request_interface::GET);
+ $key_name = str_replace('login_link_', '', $var_name);
+ $login_link_data[$key_name] = $request->variable($var_name, '', false, phpbb_request_interface::GET);
}
}