Index: extensions/oAuth/admin/providers.php
===================================================================
--- extensions/oAuth/admin/providers.php	(revision 26599)
+++ extensions/oAuth/admin/providers.php	(revision 26604)
@@ -8,8 +8,9 @@
 if (isset($_POST['save_config']))
 {
-  $providers = array();
+  $providers = array(); $count_enabled = 0;
   foreach ($_POST['providers'] as $id => $data)
   {
     $data['enabled'] = $data['enabled']=='true';
+    if ($data['enabled']) $count_enabled++;
     
     if ($PROVIDERS_CONFIG[$id]['new_app_link'] and $data['enabled'])
@@ -21,9 +22,4 @@
         $page['errors'][] = l10n('%s: invalid keys', $PROVIDERS_CONFIG[$id]['provider_name']);
       }
-    }
-    
-    if ( ($id=='Wordpress' or $id=='Flickr' or $id=='Steam') and $data['enabled'] and !@$providers['OpenID']['enabled'] ) // in the template, OpenID must be before other OpenID based providers
-    {
-      $page['errors'][] = l10n('OpenID must be enabled in order to use %s authentication', $id);
     }
     
@@ -43,4 +39,6 @@
   
   $hybridauth_conf['providers'] = $providers;
+  $hybridauth_conf['total'] = count($hybridauth_conf['providers']);
+  $hybridauth_conf['enabled'] = $count_enabled;
   
   if (!count($page['errors']))
@@ -48,5 +46,5 @@
     // generate config file
     $content = "<?php\ndefined('PHPWG_ROOT_PATH') or die('Hacking attempt!');\n\nreturn ";
-    $content.= var_export(array('providers'=>$providers), true);
+    $content.= var_export(array_intersect_key($hybridauth_conf, array_flip(array('providers','total','enabled'))), true);
     $content.= ";\n?>";
     
Index: extensions/oAuth/auth.php
===================================================================
--- extensions/oAuth/auth.php	(revision 26599)
+++ extensions/oAuth/auth.php	(revision 26604)
@@ -15,8 +15,11 @@
   }
   
-  if (
-    !array_key_exists($provider, $hybridauth_conf['providers'])
-    or !$hybridauth_conf['providers'][$provider]['enabled']
-  ) {
+  // OpenID is always enabled
+  $hybridauth_conf['providers']['OpenID']['enabled'] = true;
+  
+  if (!array_key_exists($provider, $hybridauth_conf['providers'])
+      or !$hybridauth_conf['providers'][$provider]['enabled']
+    )
+  {
     throw new Exception('Invalid provider!', 1002);
   }
Index: extensions/oAuth/include/functions.inc.php
===================================================================
--- extensions/oAuth/include/functions.inc.php	(revision 26599)
+++ extensions/oAuth/include/functions.inc.php	(revision 26604)
@@ -23,25 +23,49 @@
 }
 
-function get_activated_providers()
+function oauth_assign_template_vars($u_redirect=null)
 {
-  global $hybridauth_conf;
+  global $template, $conf, $hybridauth_conf;
   
-  return array_filter($hybridauth_conf['providers'], create_function('$p', 'return $p["enabled"];'));
-}
-
-function oauth_assign_template_vars()
-{
-  global $template, $conf;
+  $conf['oauth']['include_common_template'] = true;
   
-  if ($template->get_template_vars('OAUTH_URL') == null)
+  if ($template->get_template_vars('OAUTH') == null)
   {
+    $template->assign('OAUTH', array(
+      'conf' => $conf['oauth'],
+      'u_login' => get_root_url() . OAUTH_PATH . 'auth.php?provider=',
+      'providers' => $hybridauth_conf['providers'],
+      ));
     $template->assign(array(
-      'oauth' => $conf['oauth'],
-      'OAUTH_URL' => get_root_url() . OAUTH_PATH . 'auth.php?provider=',
       'OAUTH_PATH' => OAUTH_PATH,
       'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/',
-      'PROVIDERS' => get_activated_providers(),
       'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/',
       ));
   }
+  
+  if (isset($u_redirect))
+  {
+    $template->append('OAUTH', compact('u_redirect'), true);
+  }
 }
+
+function get_oauth_id($user_id)
+{
+  global $conf;
+  
+  $query = '
+SELECT oauth_id FROM ' . USERS_TABLE . '
+  WHERE ' . $conf['user_fields']['id'] . ' = ' . $user_id . '
+  AND oauth_id != ""
+;';
+  $result = pwg_query($query);
+  
+  if (!pwg_db_num_rows($result))
+  {
+    return null;
+  }
+  else
+  {
+    list($oauth_id) = pwg_db_fetch_row($result);
+    return $oauth_id;
+  }
+}
Index: extensions/oAuth/include/public_events.inc.php
===================================================================
--- extensions/oAuth/include/public_events.inc.php	(revision 26599)
+++ extensions/oAuth/include/public_events.inc.php	(revision 26604)
@@ -7,9 +7,14 @@
 function oauth_begin_identification()
 {
-  global $template, $conf;
-  
-  oauth_assign_template_vars();
-  $template->assign('REDIRECT_TO', !empty($_GET['redirect']) ? urldecode($_GET['redirect']) : get_gallery_home_url());
-  
+  global $template, $conf, $hybridauth_conf;
+  
+  if ($hybridauth_conf['enabled'] > 0)
+  {
+    return;
+  }
+
+  $u_redirect = !empty($_GET['redirect']) ? urldecode($_GET['redirect']) : get_gallery_home_url();
+  oauth_assign_template_vars($u_redirect);
+
   $template->set_prefilter('identification', 'oauth_add_buttons_prefilter');
 }
@@ -23,6 +28,6 @@
   
   $query = '
-SELECT oauth_id FROM '.USERS_TABLE.'
-  WHERE '.$conf['user_fields']['username'].' = "'.pwg_db_real_escape_string($username).'"
+SELECT oauth_id FROM ' . USERS_TABLE . '
+  WHERE ' . $conf['user_fields']['username'] . ' = "' . pwg_db_real_escape_string($username) . '"
   AND oauth_id != ""
 ;';
@@ -49,4 +54,9 @@
 {
   global $conf, $template, $hybridauth_conf, $page;
+  
+  if ($hybridauth_conf['enabled'] == 0)
+  {
+    return;
+  }
   
   // coming from identification page
@@ -69,10 +79,9 @@
       }
     
-      $template->assign(array(
-        'OAUTH_PROVIDER' => $provider,
-        'OAUTH_USERNAME' => $remote_user->displayName,
-        'OAUTH_PROFILE_URL' => $remote_user->profileURL,
-        'OAUTH_AVATAR' => $remote_user->photoURL,
-        'OAUTH_PATH' => OAUTH_PATH,
+      $template->assign('OAUTH_USER', array(
+        'provider' => $provider,
+        'username' => $remote_user->displayName,
+        'u_profile' => $remote_user->profileURL,
+        'avatar' => $remote_user->photoURL,
         ));
         
@@ -84,20 +93,22 @@
       if (isset($_POST['submit']))
       {
-        $page['errors'] =
-          register_user($_POST['login'],
-                        hash('sha1', $oauth_id.$conf['secret_key']),
-                        $_POST['mail_address']
-                        );
-                        
-        if (count($page['errors']) == 0)
+        $user_id = register_user(
+          $_POST['login'],
+          hash('sha1', $oauth_id.$conf['secret_key']),
+          $_POST['mail_address'],
+          true,
+          $page['errors'],
+          false
+          );
+
+        if ($user_id !== false)
         {
           pwg_unset_session_var('oauth_new_user');
-          $user_id = get_userid($_POST['login']);
           
           // update oauth field
           $query = '
-UPDATE '.USERS_TABLE.'
-  SET oauth_id = "'.$oauth_id.'"
-  WHERE '.$conf['user_fields']['id'].' = '.$user_id.'
+UPDATE ' . USERS_TABLE . '
+  SET oauth_id = "' . $oauth_id . '"
+  WHERE ' . $conf['user_fields']['id'] . ' = ' . $user_id . '
 ;';
           pwg_query($query);
@@ -118,4 +129,5 @@
       
       // template
+      $template->assign('OAUTH_PATH', OAUTH_PATH);
       $template->set_prefilter('register', 'oauth_add_profile_prefilter');
       $template->set_prefilter('register', 'oauth_remove_password_fields_prefilter');
@@ -128,6 +140,5 @@
   else if ($conf['oauth']['display_register'])
   {
-    oauth_assign_template_vars();
-    $template->assign('REDIRECT_TO', get_gallery_home_url());
+    oauth_assign_template_vars(get_gallery_home_url());
     
     $template->set_prefilter('register', 'oauth_add_buttons_prefilter');
@@ -141,19 +152,13 @@
 function oauth_begin_profile()
 {
-  global $template, $user, $conf, $hybridauth_conf, $page;
-  
-  $query = '
-SELECT oauth_id FROM '.USERS_TABLE.'
-  WHERE '.$conf['user_fields']['id'].' = '.$user['id'].'
-  AND oauth_id != ""
-;';
-  $result = pwg_query($query);
-  
-  if (!pwg_db_num_rows($result))
-  {
-    return;
-  }
-  
-  list($oauth_id) = pwg_db_fetch_row($result);
+  global $template, $user, $hybridauth_conf, $page;
+  
+  $oauth_id = get_oauth_id($user['id']);
+  
+  if (!isset($oauth_id))
+  {
+    return;
+  }
+  
   list($provider) = explode('---', $oauth_id);
   
@@ -165,12 +170,12 @@
     $remote_user = $adapter->getUserProfile();
     
-    $template->assign(array(
-      'OAUTH_PROVIDER' => $provider,
-      'OAUTH_USERNAME' => $remote_user->displayName,
-      'OAUTH_PROFILE_URL' => $remote_user->profileURL,
-      'OAUTH_AVATAR' => $remote_user->photoURL,
-      'OAUTH_PATH' => OAUTH_PATH,
+    $template->assign('OAUTH_USER', array(
+      'provider' => $provider,
+      'username' => $remote_user->displayName,
+      'u_profile' => $remote_user->profileURL,
+      'avatar' => $remote_user->photoURL,
       ));
     
+    $template->assign('OAUTH_PATH', OAUTH_PATH);
     $template->set_prefilter('profile_content', 'oauth_add_profile_prefilter');
     $template->set_prefilter('profile_content', 'oauth_remove_password_fields_prefilter');
@@ -187,19 +192,13 @@
 function oauth_logout($user_id)
 {
-  global $conf, $hybridauth_conf;
-  
-  $query = '
-SELECT oauth_id FROM '.USERS_TABLE.'
-  WHERE '.$conf['user_fields']['id'].' = '.$user_id.'
-  AND oauth_id != ""
-;';
-  $result = pwg_query($query);
-  
-  if (!pwg_db_num_rows($result))
-  {
-    return;
-  }
-  
-  list($oauth_id) = pwg_db_fetch_row($result);
+  global $hybridauth_conf;
+  
+  $oauth_id = get_oauth_id($user_id);
+  
+  if (!isset($oauth_id))
+  {
+    return;
+  }
+
   list($provider) = explode('---', $oauth_id);
   
@@ -222,17 +221,30 @@
 function oauth_blockmanager($menu_ref_arr)
 {
-  global $template, $conf;
+  global $template, $conf, $hybridauth_conf;
   
   $menu = &$menu_ref_arr[0];  
   
-  if (!$conf['oauth']['display_menubar'] or $menu->get_block('mbIdentification') == null)
-  {
-    return;
-  }
-  
-  oauth_assign_template_vars();
-  $template->assign('REDIRECT_TO', get_gallery_home_url());
+  if ($hybridauth_conf['enabled'] == 0 or
+      !$conf['oauth']['display_menubar'] or
+      $menu->get_block('mbIdentification') == null
+    )
+  {
+    return;
+  }
+  
+  oauth_assign_template_vars(get_gallery_home_url());
   
   $template->set_prefilter('menubar', 'oauth_add_menubar_buttons_prefilter');
+}
+
+function oauth_include_template()
+{
+  global $conf, $template;
+  
+  if (isset($conf['oauth']['include_common_template']))
+  {
+    $template->set_filename('oauth', realpath(OAUTH_PATH . 'template/identification_common.tpl'));
+    $template->parse('oauth');
+  }
 }
 
@@ -254,5 +266,5 @@
   $script = '
 {footer_script require="jquery"}
-jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent().css("display", "none");
+jQuery("input[type=password], input[name=send_password_by_mail]").parent().hide();
 {/footer_script}';
 
@@ -263,13 +275,13 @@
 function oauth_add_profile_prefilter($content)
 {
-  $search = '#</legend>#';
+  $search = '#(</legend>)#';
   $add = file_get_contents(OAUTH_PATH . 'template/profile.tpl');
-  return preg_replace($search, '</legend> '.$add, $content, 1);
+  return preg_replace($search, '$1 '.$add, $content, 1);
 }
 
 function oauth_add_menubar_buttons_prefilter($content)
 {
-  $search = '{include file=$block->template|@get_extent:$id }';
+  $search = '#({include file=\$block->template\|@?get_extent:\$id ?})#';
   $add = file_get_contents(OAUTH_PATH . 'template/identification_menubar.tpl');
-  return str_replace($search, $search.$add, $content);
-}
+  return preg_replace($search, '$1 '.$add, $content);
+}
Index: extensions/oAuth/main.inc.php
===================================================================
--- extensions/oAuth/main.inc.php	(revision 26599)
+++ extensions/oAuth/main.inc.php	(revision 26604)
@@ -42,4 +42,6 @@
   add_event_handler('loc_begin_register', 'oauth_begin_register');
   add_event_handler('loc_begin_profile', 'oauth_begin_profile');
+  
+  add_event_handler('loc_after_page_header', 'oauth_include_template');
   
   add_event_handler('try_log_user', 'oauth_try_log_user', EVENT_HANDLER_PRIORITY_NEUTRAL-30, 2);
Index: extensions/oAuth/maintain.inc.php
===================================================================
--- extensions/oAuth/maintain.inc.php	(revision 26599)
+++ extensions/oAuth/maintain.inc.php	(revision 26604)
@@ -12,4 +12,13 @@
     'menubar_icon' => '26px',
     );
+    
+  private $file;
+  
+  function __construct($plugin_id)
+  {
+    parent::__construct($plugin_id);
+    
+    $this->file = PWG_LOCAL_DIR . 'config/hybridauth.inc.php';
+  }
 
   function install($plugin_version, &$errors=array())
@@ -27,4 +36,23 @@
     {      
       pwg_query('ALTER TABLE `' . USERS_TABLE . '` ADD `oauth_id` VARCHAR(255) DEFAULT NULL;');
+    }
+    
+    // add fields in hybridauth conf file
+    if (file_exists($this->file))
+    {
+      $hybridauth_conf = include($this->file);
+      if (!isset($hybridauth_conf['total']))
+      {
+        $enabled = array_filter($hybridauth_conf['providers'], create_function('$p', 'return $p["enabled"];'));
+        
+        $hybridauth_conf['total'] = count($hybridauth_conf['providers']);
+        $hybridauth_conf['enabled'] = count($enabled);
+        
+        $content = "<?php\ndefined('PHPWG_ROOT_PATH') or die('Hacking attempt!');\n\nreturn ";
+        $content.= var_export($hybridauth_conf, true);
+        $content.= ";\n?>";
+        
+        file_put_contents($this->file, $content);
+      }
     }
 
@@ -50,5 +78,5 @@
     pwg_query('ALTER TABLE `'. USERS_TABLE .'` DROP `oauth_id`;');
     
-    @unlink(PHPWG_PLUGINS_PATH . PWG_LOCAL_DIR . 'config/hybridauth.inc.php');
+    @unlink($this->file);
   }
 }
Index: extensions/oAuth/template/auth.tpl
===================================================================
--- extensions/oAuth/template/auth.tpl	(revision 26599)
+++ extensions/oAuth/template/auth.tpl	(revision 26604)
@@ -30,5 +30,5 @@
 {elseif $REDIRECT_TO}
   <script type="text/javascript"> 
-    if (window.opener) window.opener.parent.redirect('{$REDIRECT_TO}');
+    if (window.opener) window.opener.parent.oauth_redirect('{$REDIRECT_TO}');
     window.self.close();
   </script>
Index: extensions/oAuth/template/identification_common.tpl
===================================================================
--- extensions/oAuth/template/identification_common.tpl	(revision 26599)
+++ extensions/oAuth/template/identification_common.tpl	(revision 26604)
@@ -12,8 +12,8 @@
 {footer_script}
 // redirect, called from the popup
-function redirect(type) {
-  var url = "{$REDIRECT_TO}";
-  if (typeof type != 'undefined' && type != 'default') {
-    url = "{$ABS_ROOT_URL}"+ type +".php";
+function oauth_redirect(type) {
+  var url = '{$OAUTH.u_redirect}';
+  if (type && type != 'default') {
+    url = '{$ABS_ROOT_URL}'+ type +'.php';
   }
 
@@ -24,12 +24,14 @@
 function open_auth(url) {
   window.open(
-    url+ "&t=" + (new Date()).getTime(), 
-    "hybridauth_social_sing_on", 
-    "location=0,status=0,scrollbars=0,width=800,height=500"
+    url + '&t=' + (new Date()).getTime(), 
+    'hybridauth_social_sign_on', 
+    'location=0,status=0,scrollbars=0,width=800,height=500'
   );  
 }
 
 // click on a button
-jQuery("a.oauth").click(function() {
+jQuery('a.oauth').click(function(e) {
+  e.preventDefault();
+  
   var idp = jQuery(this).data('idp');
   
@@ -38,7 +40,7 @@
       switch(idp) {
         case 'OpenID':
-          jQuery("#openid_label").html('{'Please enter your OpenID URL'|translate|escape:javascript}'); break;
+          jQuery('#openid_label').html('{'Please enter your OpenID URL'|translate|escape:javascript}'); break;
         case 'Wordpress': case 'Flickr': case 'Steam':
-          jQuery("#openid_label").html('{'Please enter your username'|translate|escape:javascript}'); break;
+          jQuery('#openid_label').html('{'Please enter your username'|translate|escape:javascript}'); break;
       }
       
@@ -47,53 +49,54 @@
         bg_color = $('body').css('background-color');
       }
-      jQuery("#openid_form").css('background-color', bg_color);
+      jQuery('#openid_form').css('background-color', bg_color);
 
-      jQuery("#openid_form .oauth_38px").removeClass().addClass("oauth_38px " + idp.toLowerCase());
-      jQuery("#openid_form h3").html(idp);
-      jQuery("#openid_form").data('idp', idp);
+      jQuery('#openid_form .oauth_38px').removeClass().addClass('oauth_38px ' + idp.toLowerCase());
+      jQuery('#openid_form h3').html(idp);
+      jQuery('#openid_form').data('idp', idp);
 
       jQuery.colorbox({
-        inline:true,
-        href:"#openid_form",
-        initialWidth:0,
-        initialHeight:0,
+        inline: true,
+        href: '#openid_form',
+        initialWidth: 0,
+        initialHeight: 0,
+        mawWidth: '100%',
         onComplete: function(){ jQuery.colorbox.resize({ speed:0 }) } // prevent misalignement when icon not loaded
-      })
+      });
       break;
       
     default:
-      open_auth("{$OAUTH_URL}"+ idp);
+      open_auth('{$OAUTH.u_login}'+ idp);
   }
-  
-  return false;
 });
 
-jQuery("#openid_form").submit(function() {
+jQuery('#openid_form').submit(function(e) {
+  e.preventDefault();
+  
   var idp = jQuery(this).data('idp');
-  var oi = jQuery("#openid_form input[name='openid_identifier']").val();
-  jQuery("#openid_form input[name='openid_identifier']").val('');
+  var oi = jQuery('#openid_form input[name=openid_identifier]').val();
+  jQuery('#openid_form input[name=openid_identifier]').val('');
   
-  jQuery("#openid_label").removeClass('error');
+  jQuery('#openid_label').removeClass('error');
   if (!oi) {
-    jQuery("#openid_label").addClass('error');
-    return false;
+    jQuery('#openid_label').addClass('error');
+    return;
   }
   
   switch(idp) {
-    case 'Wordpress': oi = "http://" + oi + ".wordpress.com"; break;
-    case 'Flickr': oi = "http://www.flickr.com/photos/" + oi + "/"; break;
-    case 'Steam': oi = "http://steamcommunity.com/openid/" + oi; break;
+    case 'Wordpress': oi = 'http://' + oi + '.wordpress.com'; break;
+    case 'Flickr': oi = 'http://www.flickr.com/photos/' + oi + '/'; break;
+    case 'Steam': oi = 'http://steamcommunity.com/openid/' + oi; break;
   }
 
-  open_auth("{$OAUTH_URL}OpenID&openid_identifier="+ encodeURI(oi));
+  open_auth('{$OAUTH.u_login}OpenID&openid_identifier=' + encodeURI(oi));
 
   jQuery.colorbox.close();
-  return false;
 });
 
-jQuery("#openid_cancel").click(function() {
-  jQuery("#openid_label").removeClass('error');
+jQuery('#openid_cancel').click(function(e) {
+  e.preventDefault();
+  
+  jQuery('#openid_label').removeClass('error');
   jQuery.colorbox.close();
-  return false;
 });
 {/footer_script}
@@ -107,5 +110,5 @@
     <div>
       <br>
-      <label id="openid_label" for="openid_identifier">Open ID URL</label>
+      <label id="openid_label" for="openid_identifier"></label>
       <br>
       <input type="text" name="openid_identifier" id="openid_identifier" size="50">
Index: extensions/oAuth/template/identification_menubar.tpl
===================================================================
--- extensions/oAuth/template/identification_menubar.tpl	(revision 26599)
+++ extensions/oAuth/template/identification_menubar.tpl	(revision 26604)
@@ -1,10 +1,6 @@
-{if $id == "mbIdentification" and isset($U_LOGIN) and count($PROVIDERS)}
-  {if not $OAUTH_JS_LOADED}
-    {assign var=OAUTH_JS_LOADED value=true}
-    {include file=$OAUTH_ABS_PATH|cat:'template/identification_common.tpl'}
-  {/if}
+{if $id == "mbIdentification" and isset($U_LOGIN)}
   {html_style}
-    dl#mbIdentification dd:first-of-type { padding-bottom:0 !important; 
-    #mbIdentification .oauth { margin:0 1px; }
+  dl#mbIdentification dd:first-of-type { padding-bottom:0 !important; }
+  #mbIdentification .oauth { margin:0 1px; }
   {/html_style}
   
@@ -14,6 +10,8 @@
       <legend>{'Or sign in with'|translate}</legend>
       
-    {foreach from=$PROVIDERS item=provider key=p}{strip}
-      <a href="#" class="oauth oauth_{$oauth.menubar_icon} {$p|strtolower}" data-idp="{$p}" title="{$provider.name}"></a>
+    {foreach from=$OAUTH.providers item=provider key=p}{strip}
+      {if $provider.enabled}
+        <a href="#" class="oauth oauth_{$OAUTH.conf.menubar_icon} {$p|strtolower}" data-idp="{$p}" title="{$provider.name}"></a>
+      {/if}
     {/strip}{/foreach}
     </fieldset>
Index: extensions/oAuth/template/identification_page.tpl
===================================================================
--- extensions/oAuth/template/identification_page.tpl	(revision 26599)
+++ extensions/oAuth/template/identification_page.tpl	(revision 26604)
@@ -1,17 +1,13 @@
-{if count($PROVIDERS)}
-  {if not $OAUTH_JS_LOADED}
-    {assign var=OAUTH_JS_LOADED value=true}
-    {include file=$OAUTH_ABS_PATH|cat:'template/identification_common.tpl'}
+{html_style}
+#oauth_wrap .oauth { margin:0 2px; }
+{/html_style}
+  
+<fieldset style="text-align:center;" id="oauth_wrap">
+  <legend>{'Or sign in with'|translate}</legend>
+  
+{foreach from=$OAUTH.providers item=provider key=p}{strip}
+  {if $provider.enabled}
+    <a href="#" class="oauth oauth_{$OAUTH.conf.identification_icon} {$p|strtolower}" data-idp="{$p}" title="{$provider.name}"></a>
   {/if}
-  {html_style}
-    #oauth_wrap .oauth { margin:0 2px; }
-  {/html_style}
-    
-  <fieldset style="text-align:center;" id="oauth_wrap">
-    <legend>{'Or sign in with'|translate}</legend>
-    
-  {foreach from=$PROVIDERS item=provider key=p}{strip}
-    <a href="#" class="oauth oauth_{$oauth.identification_icon} {$p|strtolower}" data-idp="{$p}" title="{$provider.name}"></a>
-  {/strip}{/foreach}
-  </fieldset>
-{/if}
+{/strip}{/foreach}
+</fieldset>
Index: extensions/oAuth/template/profile.tpl
===================================================================
--- extensions/oAuth/template/profile.tpl	(revision 26599)
+++ extensions/oAuth/template/profile.tpl	(revision 26604)
@@ -19,12 +19,12 @@
 
 <div id="oauth">
-{if $OAUTH_AVATAR}
-  <img src="{$OAUTH_AVATAR}" class="avatar">
+{if $OAUTH_USER.avatar}
+  <img src="{$OAUTH_USER.avatar}" class="avatar">
 {else}
   <img src="{$ROOT_URL}{$OAUTH_PATH}template/images/avatar-default.png" class="avatar">
 {/if}
 
-  {'Logged with'|translate} : <b>{$OAUTH_PROVIDER}</b><br>
-  <b>{'Username'|translate}</b> : {$OAUTH_USERNAME}<br>
-  {if $OAUTH_PROFILE_URL}<b>{'Profile URL'|translate}</b> : <a href="{$OAUTH_PROFILE_URL}">{$OAUTH_PROFILE_URL|truncate:40:' ... ':true:true}</a>{/if}
+  {'Logged with'|translate} : <b>{$OAUTH_USER.provider}</b><br>
+  <b>{'Username'|translate}</b> : {$OAUTH_USER.username}<br>
+  {if $OAUTH_USER.u_profile}<b>{'Profile URL'|translate}</b> : <a href="{$OAUTH_USER.u_profile}">{$OAUTH_USER.u_profile|truncate:40:' ... ':true:true}</a>{/if}
 </div>
