1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11832

# By Joseph Warner (187) and others
# Via Andreas Fischer (2) and others
* 'develop' of github.com:phpbb/phpbb3: (189 commits)
  [ticket/11835] Fix ucp_auth_link adding in migration
  [prep-release-3.0.12] Remove changelog entry for ticket that was not resolved.
  [feature/oauth] Fix tabindex
  [feature/oauth] Fix bug on ucp_auth_link related to error display
  [feature/oauth] More small fixes
  [feature/oauth] More minor changes from review
  [feature/oauth] Fix small bug introduced by update in OAuth library
  [feature/oauth] Fix small issues on ucp pages
  [feature/oauth] Fix typo in OAuth logout method
  [feature/oauth] Make token storage service ignorant
  [feature/oauth] Update oauth::logout() to use clearAllTokens()
  [feature/oauth] Update storage implementation due to inteface change
  [feature/oauth] Update lusitanian/oauth to stable branch
  [feature/oauth] Update comment on oauth service exception
  [feature/oauth] Forgot to remove placeholder comment
  [feature/oauth] OAuth service exception
  [feature/oauth] A few more minor changes
  [feature/oauth] Changes due to code review
  [feature/oauth] Fix redirects
  [feature/oauth] Fix issues on ucp_login_link from review
  ...
This commit is contained in:
Nathan Guse
2013-09-12 11:56:36 -05:00
52 changed files with 3073 additions and 43 deletions

View File

@@ -3204,7 +3204,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
{
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
global $request;
global $request, $phpbb_container;
if (!class_exists('phpbb_captcha_factory', false))
{
@@ -3231,7 +3231,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
trigger_error('NO_AUTH_ADMIN');
}
if (isset($_POST['login']))
if ($request->is_set_post('login') || ($request->is_set('login') && $request->variable('login', '') == 'external'))
{
// Get credential
if ($admin)
@@ -3372,6 +3372,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$s_hidden_fields['credential'] = $credential;
}
$auth_provider = $phpbb_container->get('auth.provider.' . $config['auth_method']);
$auth_provider_data = $auth_provider->get_login_data();
if ($auth_provider_data)
{
if (isset($auth_provider_data['VARS']))
{
$template->assign_vars($auth_provider_data['VARS']);
}
if (isset($auth_provider_data['BLOCK_VAR_NAME']))
{
foreach ($auth_provider_data['BLOCK_VARS'] as $block_vars)
{
$template->assign_block_vars($auth_provider_data['BLOCK_VAR_NAME'], $block_vars);
}
}
$template->assign_vars(array(
'PROVIDER_TEMPLATE_FILE' => $auth_provider_data['TEMPLATE_FILE'],
));
}
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
$template->assign_vars(array(