mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/oauth] Basic checking for data needed in login linking
PHPBB3-11673
This commit is contained in:
@@ -27,17 +27,31 @@ class ucp_login_link
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $phpbb_container, $request, $template;
|
||||
global $config, $phpbb_container, $request, $template, $user;
|
||||
|
||||
$auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
|
||||
$auth_provider = $phpbb_container->get($auth_provider);
|
||||
|
||||
// Initialize necessary variables
|
||||
$login_link_error = null;
|
||||
|
||||
// Ensure the person was sent here with login_link data
|
||||
$data = $request->variable('login_link', array());
|
||||
|
||||
if (empty($data))
|
||||
{
|
||||
$login_link_error = $user->lang['LOGIN_LINK_NO_DATA_PROVIDED'];
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
// Process POST and GET data
|
||||
$login_error = false;
|
||||
$login_username = '';
|
||||
|
||||
// Common template elements
|
||||
$template->assign_vars(array(
|
||||
'LOGIN_LINK_ERROR' => $login_link_error,
|
||||
'PASSWORD_CREDENTIAL' => 'password',
|
||||
'USERNAME_CREDENTIAL' => 'username',
|
||||
));
|
||||
|
Reference in New Issue
Block a user