mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/oauth] Get the OAuth template in place for ucp_auth_link
PHPBB3-11673
This commit is contained in:
parent
e04844c95f
commit
4003e077c1
4 changed files with 49 additions and 9 deletions
|
@ -52,6 +52,19 @@ class ucp_auth_link
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($provider_data['VARS']))
|
||||
{
|
||||
$template->assign_vars($provider_data['VARS']);
|
||||
}
|
||||
|
||||
if (isset($provider_data['BLOCK_VAR_NAME']))
|
||||
{
|
||||
foreach ($provider_data['BLOCK_VARS'] as $block_vars)
|
||||
{
|
||||
$template->assign_block_vars($provider_data['BLOCK_VAR_NAME'], $block_vars);
|
||||
}
|
||||
}
|
||||
|
||||
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
|
|
@ -452,7 +452,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
|||
|
||||
// Get all external accounts tied to the current user
|
||||
$data = array(
|
||||
'user_id' => $user->data['user_id'],
|
||||
'user_id' => $this->user->data['user_id'],
|
||||
);
|
||||
$sql = 'SELECT oauth_provider_id, provider FROM ' . $this->auth_provider_oauth_token_account_assoc . '
|
||||
WHERE ' . $this->db->sql_build_array('SELECT', $data);
|
||||
|
@ -462,9 +462,9 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
|||
|
||||
$oauth_user_ids = array();
|
||||
|
||||
if ($row !== false && !empty($rows))
|
||||
if ($rows !== false && !empty($rows))
|
||||
{
|
||||
foreach ($row as $row)
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$oauth_user_ids[$row['provider']] = $row['oauth_provider_id'];
|
||||
}
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
<h2>{L_UCP_AUTH_LINK_TITLE}</h2>
|
||||
|
||||
<!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<!-- IF ERROR --><dl><dd class="error">{ERROR}</dd></dl><!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
|
||||
<!-- INCLUDE {PROVIDER_TEMPLATE_FILE} -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- INCLUDE ucp_footer.html -->
|
||||
|
|
|
@ -1,5 +1,28 @@
|
|||
<form id="ucp" method="post" action="{S_UCP_ACTION}">
|
||||
<!-- BEGIN oauth -->
|
||||
<form id="ucp" method="post" action="{S_UCP_ACTION}">
|
||||
<h3>{oauth.SERVICE_NAME}</h3>
|
||||
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
</form>
|
||||
<fieldset class="fields2">
|
||||
<!-- IF oauth.UNIQUE_ID -->
|
||||
<dl>
|
||||
<dt>{L_UCP_AUTH_LINK_ID}{L_COLON}</dt>
|
||||
<dd>{oauth.UNIQUE_ID}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt> </dt>
|
||||
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="unlink" tabindex="6" value="{L_UNLINK}" class="button1" /></dd>
|
||||
</dl>
|
||||
<!-- ELSE -->
|
||||
<dl>
|
||||
<dd>{L_UCP_AUTH_LINK_ASK}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt> </dt>
|
||||
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="link" tabindex="6" value="{L_LINK}" class="button1" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF-->
|
||||
</fieldset>
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
</form>
|
||||
<!-- END oauth -->
|
||||
|
|
Loading…
Add table
Reference in a new issue