includes/sessions.php
changeset 593 4f9bec0d65c1
parent 592 27377179fe58
child 595 b051eb79b158
--- a/includes/sessions.php	Wed Jul 02 19:36:44 2008 -0400
+++ b/includes/sessions.php	Wed Jul 02 22:15:55 2008 -0400
@@ -2519,8 +2519,11 @@
     // cache info if possible
     static $_cache = array();
     
+    if ( is_int($id) && $id == 0 )
+      $id = 1;
+    
     if ( is_int($id) )
-      $col = "user_id = $id";
+      $col = "u.user_id = $id";
     else if ( is_string($id) )
       $col = ENANO_SQLFUNC_LOWERCASE . "(username) = " . ENANO_SQLFUNC_LOWERCASE . "('" . $db->escape($id) . "')";
     else