Ignore:
Timestamp:
Jul 6, 2013, 4:32:05 PM (11 years ago)
Author:
mistic100
Message:

add Steam provider (OpenID based)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/oAuth/include/public_events.inc.php

    r21584 r23808  
    3535    $_SESSION['page_errors'][] = sprintf(l10n('You registered with a %s account, please sign in with the same account.'), $provider);
    3636   
    37     $redirect_to = get_root_url().'identification.php';
     37    $redirect_to = get_root_url().'identification.php'; // variable used by identification.php
    3838    return true;
    3939  }
     
    5050  global $conf, $template, $hybridauth_conf, $page;
    5151 
    52   // comming from identification page
     52  // coming from identification page
    5353  if (pwg_get_session_var('oauth_new_user') != null)
    5454  {
     
    6666      {
    6767        pwg_unset_session_var('oauth_new_user');
    68         throw new Exception('Hacking attempt!');
     68        throw new Exception('Hacking attempt!', 403);
    6969      }
    7070   
     
    142142function oauth_begin_profile()
    143143{
    144   global $template, $user, $conf, $hybridauth_conf;
     144  global $template, $user, $conf, $hybridauth_conf, $page;
    145145 
    146146  $query = '
     
    254254  $add = 'disabled="disabled" ';
    255255  $script = '
    256 {footer_script}
    257 jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent("li").css("display", "none");
     256{footer_script require="jquery"}
     257jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent().css("display", "none");
    258258{/footer_script}';
    259259
     
    276276}
    277277
    278 
    279 function oauth_assign_template_vars()
    280 {
    281   global $template, $conf;
    282  
    283   if ($template->get_template_vars('OAUTH_URL') == null)
    284   {
    285     $template->assign(array(
    286       'oauth' => $conf['oauth'],
    287       'OAUTH_URL' => get_root_url() . OAUTH_PATH . 'auth.php?provider=',
    288       'OAUTH_PATH' => OAUTH_PATH,
    289       'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/',
    290       'PROVIDERS' => get_activated_providers(),
    291       'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/',
    292       ));
    293   }
    294 }
    295278?>
Note: See TracChangeset for help on using the changeset viewer.