Index: /extensions/oAuth/auth.php
===================================================================
--- /extensions/oAuth/auth.php	(revision 26618)
+++ /extensions/oAuth/auth.php	(revision 26619)
@@ -22,5 +22,5 @@
   if ($provider == 'Persona')
   {
-    if (!verify_ephemeral_key(@$_POST['key']) | empty($_POST['assertion']))
+    if (!verify_ephemeral_key(@$_POST['key']) || empty($_POST['assertion']))
     {
       header('HTTP/1.1 403 Forbidden');
@@ -63,5 +63,5 @@
     // check is already registered
     $query = '
-SELECT id FROM ' . USERS_TABLE . '
+SELECT user_id FROM ' . USER_INFOS_TABLE . '
   WHERE oauth_id = "' . implode('---', $oauth_id) . '"
 ;';
Index: /extensions/oAuth/include/admin_events.inc.php
===================================================================
--- /extensions/oAuth/include/admin_events.inc.php	(revision 26619)
+++ /extensions/oAuth/include/admin_events.inc.php	(revision 26619)
@@ -0,0 +1,56 @@
+<?php
+defined('OAUTH_PATH') or die('Hacking attempt!');
+
+function oauth_admin_plugin_menu_links($menu) 
+{
+  $menu[] = array(
+    'NAME' => 'Social Connect',
+    'URL' => OAUTH_ADMIN,
+    );
+  return $menu;
+}
+
+function oauth_user_list_columns($aColumns)
+{
+  $aColumns[] ='oauth_id';
+  return $aColumns;
+}
+
+function oauth_user_list_render($output)
+{
+  global $aColumns, $hybridauth_conf;
+  
+  $oauth_col = array_search('oauth_id', $aColumns);
+  $username_col = array_search('username', $aColumns);
+  
+  foreach ($output['aaData'] as &$user)
+  {
+    if (!empty($user[$oauth_col]))
+    {
+      list($provider) = explode('---', $user[$oauth_col], 2);
+    }
+    else
+    {
+      $provider = '';
+    }
+    
+    $user[$username_col] = '<span class="oauth_16px '.strtolower($provider).'" title="'. @$hybridauth_conf['providers'][$provider]['name'] .'"></span> 
+' . $user[$username_col];
+    unset($user[$oauth_col]);
+  }
+  unset($user);
+  
+  return $output;
+}
+
+function oauth_user_list()
+{
+  global $template, $page;
+  
+  if ($page['page'] != 'user_list')
+  {
+    return;
+  }
+
+  $template->func_combine_css(array('path' => OAUTH_PATH . 'template/oauth_sprites.css'));
+}
Index: /extensions/oAuth/include/functions.inc.php
===================================================================
--- /extensions/oAuth/include/functions.inc.php	(revision 26618)
+++ /extensions/oAuth/include/functions.inc.php	(revision 26619)
@@ -62,9 +62,7 @@
 function get_oauth_id($user_id)
 {
-  global $conf;
-  
   $query = '
-SELECT oauth_id FROM ' . USERS_TABLE . '
-  WHERE ' . $conf['user_fields']['id'] . ' = ' . $user_id . '
+SELECT oauth_id FROM ' . USER_INFOS_TABLE . '
+  WHERE user_id = ' . $user_id . '
   AND oauth_id != ""
 ;';
Index: /extensions/oAuth/include/public_events.inc.php
===================================================================
--- /extensions/oAuth/include/public_events.inc.php	(revision 26618)
+++ /extensions/oAuth/include/public_events.inc.php	(revision 26619)
@@ -28,5 +28,8 @@
   
   $query = '
-SELECT oauth_id FROM ' . USERS_TABLE . '
+SELECT oauth_id
+  FROM ' . USER_INFOS_TABLE . ' AS i
+    INNER JOIN ' . USERS_TABLE . ' AS u
+    ON i.user_id = u.' . $conf['user_fields']['id'] . '
   WHERE ' . $conf['user_fields']['username'] . ' = "' . pwg_db_real_escape_string($username) . '"
   AND oauth_id != ""
@@ -125,7 +128,7 @@
           // update oauth field
           $query = '
-UPDATE ' . USERS_TABLE . '
+UPDATE ' . USER_INFOS_TABLE . '
   SET oauth_id = "' . $oauth_id . '"
-  WHERE ' . $conf['user_fields']['id'] . ' = ' . $user_id . '
+  WHERE user_id = ' . $user_id . '
 ;';
           pwg_query($query);
Index: /extensions/oAuth/main.inc.php
===================================================================
--- /extensions/oAuth/main.inc.php	(revision 26618)
+++ /extensions/oAuth/main.inc.php	(revision 26619)
@@ -30,7 +30,4 @@
 }
 
-// force getuserdata() to retrieve 'oauth_id' field
-$conf['user_fields']['oauth_id'] = 'oauth_id';
-
 
 add_event_handler('init', 'oauth_init');
@@ -39,4 +36,11 @@
 {
   add_event_handler('get_admin_plugin_menu_links', 'oauth_admin_plugin_menu_links');
+  
+  add_event_handler('user_list_columns', 'oauth_user_list_columns');
+  add_event_handler('after_render_user_list', 'oauth_user_list_render');
+  
+  add_event_handler('loc_begin_admin_page', 'oauth_user_list');
+  
+  include_once(OAUTH_PATH . 'include/admin_events.inc.php');
 }
 else if (!empty($hybridauth_conf) and function_exists('curl_init'))
@@ -101,14 +105,3 @@
     // }
   // }
-  
-  // pwg_unset_session_var('persona_logout');
 }
-
-function oauth_admin_plugin_menu_links($menu) 
-{
-  $menu[] = array(
-    'NAME' => 'Social Connect',
-    'URL' => OAUTH_ADMIN,
-    );
-  return $menu;
-}
Index: /extensions/oAuth/maintain.inc.php
===================================================================
--- /extensions/oAuth/maintain.inc.php	(revision 26618)
+++ /extensions/oAuth/maintain.inc.php	(revision 26619)
@@ -32,8 +32,25 @@
     }
     
+    $result = pwg_query('SHOW COLUMNS FROM `' . USER_INFOS_TABLE . '` LIKE "oauth_id";');
+    if (!pwg_db_num_rows($result))
+    {
+      pwg_query('ALTER TABLE `' . USER_INFOS_TABLE . '` ADD `oauth_id` VARCHAR(255) DEFAULT NULL;');
+    }
+    
+    // move field from users table to user_infos
     $result = pwg_query('SHOW COLUMNS FROM `' . USERS_TABLE . '` LIKE "oauth_id";');
-    if (!pwg_db_num_rows($result))
-    {      
-      pwg_query('ALTER TABLE `' . USERS_TABLE . '` ADD `oauth_id` VARCHAR(255) DEFAULT NULL;');
+    if (pwg_db_num_rows($result))
+    {
+      $query = '
+UPDATE `' . USER_INFOS_TABLE . '` AS i
+  SET oauth_id = (
+    SELECT oauth_id
+      FROM `' . USERS_TABLE . '` AS u
+      WHERE u.'.$conf['user_fields']['id'].' = i.user_id
+    )
+;';
+      pwg_query($query);
+      
+      pwg_query('ALTER TABLE `' . USERS_TABLE . '` DROP `oauth_id`;');
     }
     
@@ -76,5 +93,5 @@
     conf_delete_param('oauth');
 
-    pwg_query('ALTER TABLE `'. USERS_TABLE .'` DROP `oauth_id`;');
+    pwg_query('ALTER TABLE `'. USER_INFOS_TABLE .'` DROP `oauth_id`;');
     
     @unlink($this->file);
