aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-25 14:53:05 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-25 14:53:19 -0400
commit59852b5997905ed6f815c3cc4b9220872e1090d2 (patch)
treecf91ddfdc3c995bc1d7eee79b66d229ef8cf393a
parent317a71a8384f137cedca3c9afbb02605876920c3 (diff)
downloadforums-59852b5997905ed6f815c3cc4b9220872e1090d2.tar
forums-59852b5997905ed6f815c3cc4b9220872e1090d2.tar.gz
forums-59852b5997905ed6f815c3cc4b9220872e1090d2.tar.bz2
forums-59852b5997905ed6f815c3cc4b9220872e1090d2.tar.xz
forums-59852b5997905ed6f815c3cc4b9220872e1090d2.zip
[feature/oauth] More work on login linking accounts
PHPBB3-11673
-rw-r--r--phpBB/includes/ucp/ucp_login_link.php23
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/styles/prosilver/template/ucp_login_link.html34
3 files changed, 58 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_login_link.php b/phpBB/includes/ucp/ucp_login_link.php
index 7e6374ee83..62641f0367 100644
--- a/phpBB/includes/ucp/ucp_login_link.php
+++ b/phpBB/includes/ucp/ucp_login_link.php
@@ -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';
}
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 32b70e661b..f44fd8905b 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -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.',
diff --git a/phpBB/styles/prosilver/template/ucp_login_link.html b/phpBB/styles/prosilver/template/ucp_login_link.html
index ddde41f374..02a9873f2b 100644
--- a/phpBB/styles/prosilver/template/ucp_login_link.html
+++ b/phpBB/styles/prosilver/template/ucp_login_link.html
@@ -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>&nbsp;</dt>
+ <dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
+ </dl>
+ </fieldset>
+ </form>
+ </div>
+
</div>
</div>