mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/oauth] Basic checking for data needed in login linking
PHPBB3-11673
This commit is contained in:
parent
59852b5997
commit
75206c74be
3 changed files with 22 additions and 3 deletions
|
@ -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',
|
||||
));
|
||||
|
|
|
@ -272,6 +272,7 @@ $lang = array_merge($lang, array(
|
|||
'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.',
|
||||
'LOGIN_LINK' => 'Link or Register Your External Account with phpBB',
|
||||
'LOGIN_LINK_EXPLAIN' => 'You have attempted to login with an external service that is not yet connected to an account on these forums. You may now either link this account to an existing account or you may create a new account.',
|
||||
'LOGIN_LINK_NO_DATA_PROVIDED' => 'No data has been provided to this page to link an external account to a forum account. Please contact the board administrator if you continue to experience problems.',
|
||||
'LOGIN_KEY' => 'Login Key',
|
||||
'LOGIN_TIME' => 'Login Time',
|
||||
'LOGIN_REDIRECT' => 'You have been successfully logged in.',
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
<p>{L_LOGIN_LINK_EXPLAIN}</p>
|
||||
|
||||
<!-- IF LOGIN_LINK_ERROR --><div class="content">
|
||||
<div class="error">{LOGIN_ERROR}</div>
|
||||
</div><!-- ENDIF -->
|
||||
|
||||
<div class="content">
|
||||
<h2>{L_REGISTER}</h2>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue