mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/oauth] More work on login linking accounts
PHPBB3-11673
This commit is contained in:
parent
317a71a838
commit
59852b5997
3 changed files with 58 additions and 0 deletions
|
@ -32,6 +32,29 @@ class ucp_login_link
|
|||
$auth_provider = 'auth.provider.' . $request->variable('auth_provider', $config['auth_method']);
|
||||
$auth_provider = $phpbb_container->get($auth_provider);
|
||||
|
||||
// Process POST and GET data
|
||||
$login_error = false;
|
||||
$login_username = '';
|
||||
|
||||
// Common template elements
|
||||
$template->assign_vars(array(
|
||||
'PASSWORD_CREDENTIAL' => 'password',
|
||||
'USERNAME_CREDENTIAL' => 'username',
|
||||
));
|
||||
|
||||
// Registration template
|
||||
$register_link = 'ucp.php?mode=register';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'REGISTER_LINK' => redirect($register_link, true),
|
||||
));
|
||||
|
||||
// Link to existing account template
|
||||
$template->assign_vars(array(
|
||||
'LOGIN_ERROR' => $login_error,
|
||||
'LOGIN_USERNAME' => $login_username,
|
||||
));
|
||||
|
||||
$this->tpl_name = 'ucp_login_link';
|
||||
$this->page_title = 'UCP_LOGIN_LINK';
|
||||
}
|
||||
|
|
|
@ -271,6 +271,7 @@ $lang = array_merge($lang, array(
|
|||
'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.',
|
||||
'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_KEY' => 'Login Key',
|
||||
'LOGIN_TIME' => 'Login Time',
|
||||
'LOGIN_REDIRECT' => 'You have been successfully logged in.',
|
||||
|
|
|
@ -5,6 +5,40 @@
|
|||
|
||||
<h2>{SITENAME} - {L_LOGIN_LINK}</h2>
|
||||
|
||||
<p>{L_LOGIN_LINK_EXPLAIN}</p>
|
||||
|
||||
<div class="content">
|
||||
<h2>{L_REGISTER}</h2>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h2>{L_LOGIN}</h2>
|
||||
|
||||
<form action="{LOGIN_ACTION}" method="post" id="login">
|
||||
<fieldset class="fields1">
|
||||
<!-- IF LOGIN_ERROR --><div class="error">{LOGIN_ERROR}</div><!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="{USERNAME_CREDENTIAL}">{L_USERNAME}{L_COLON}</label></dt>
|
||||
<dd><input type="text" tabindex="1" name="{USERNAME_CREDENTIAL}" id="{USERNAME_CREDENTIAL}" size="25" value="{LOGIN_USERNAME}" class="inputbox autowidth" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="{PASSWORD_CREDENTIAL}">{L_PASSWORD}{L_COLON}</label></dt>
|
||||
<dd><input type="password" tabindex="2" id="{PASSWORD_CREDENTIAL}" name="{PASSWORD_CREDENTIAL}" size="25" class="inputbox autowidth" /></dd>
|
||||
</dl>
|
||||
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
|
||||
<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
|
||||
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
{S_LOGIN_REDIRECT}
|
||||
<dl>
|
||||
<dt> </dt>
|
||||
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue