mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/oauth] Possible way of getting the login data to login_box()
PHPBB3-11673
This commit is contained in:
parent
cd49cfacfb
commit
0be81468e7
2 changed files with 18 additions and 2 deletions
|
@ -238,6 +238,22 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
|||
*/
|
||||
public function get_login_data()
|
||||
{
|
||||
return array();
|
||||
$login_data = array();
|
||||
|
||||
foreach ($this->service_providers as $service_name => $service_provider)
|
||||
{
|
||||
// Only include data if the credentials are set
|
||||
$credentials = $service_provider->get_service_credentials();
|
||||
if ($credentials['key'] && $credentials['secret'])
|
||||
{
|
||||
$login_data[$service_provider] = array();
|
||||
|
||||
// Build the redirect url for the box
|
||||
$redirect_url = build_url(false) . '&oauth_service=' . $service_name;
|
||||
$login_data[$service_provider]['url'] = redirect($redirect_url, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $login_data;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
</div><!-- IF OAUTH_LOGIN -->
|
||||
|
||||
<div class="content">
|
||||
hi
|
||||
|
||||
</div><!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue