Index: trunk/admin/user_list.php
===================================================================
--- trunk/admin/user_list.php	(revision 2)
+++ trunk/admin/user_list.php	(revision 9)
@@ -1,8 +1,8 @@
 <?php
 /***************************************************************************
- *                 liste_users.php is a part of PhpWebGallery              *
+ *                               user_list.php                             *
  *                            -------------------                          *
- *   last update          : Tuesday, July 16, 2002                         *
- *   email                : pierrick@z0rglub.com                           *
+ *   application          : PhpWebGallery 1.3                              *
+ *   author               : Pierrick LE GALL <pierrick@z0rglub.com>        *
  *                                                                         *
  ***************************************************************************/
@@ -39,7 +39,7 @@
                     $lang['listuser_button_create_address'] );
 //--------------------------------------------------------------- delete a user
-if ( isset ( $_GET['delete'] ) && is_numeric( $_GET['delete'] ) )
+if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
 {
-  $query = 'select pseudo';
+  $query = 'select username';
   $query.= ' from '.$prefixeTable.'users';
   $query.= ' where id = '.$_GET['delete'];
@@ -50,5 +50,5 @@
   {
     $vtp->addSession( $sub, 'deletion' );
-    $vtp->setVar( $sub, 'deletion.login', $row['pseudo'] );
+    $vtp->setVar( $sub, 'deletion.login', $row['username'] );
     $yes_url = './admin.php?page=user_list&amp;delete='.$_GET['delete'];
     $yes_url.= '&amp;confirm=1';
@@ -62,5 +62,6 @@
   {
     $vtp->addSession( $sub, 'confirmation' );
-    if ( $row['pseudo'] != 'visiteur' && $row['pseudo'] != $conf['webmaster'] )
+    if ( $row['username'] != 'guest'
+         and $row['username'] != $conf['webmaster'] )
     {
       $query = 'select count(*) as nb_result';
@@ -73,5 +74,5 @@
         delete_user( $_GET['delete'] );
         $vtp->setVar( $sub, 'confirmation.class', 'info' );
-        $info = '"'.$row['pseudo'].'" '.$lang['listuser_info_deletion'];
+        $info = '"'.$row['username'].'" '.$lang['listuser_info_deletion'];
         $vtp->setVar( $sub, 'confirmation.info', $info );
       }
@@ -102,7 +103,7 @@
   $vtp->setVar( $sub, 'users.form_action', $action );
 
-  $query = 'select id,pseudo,status,mail_address';
+  $query = 'select id,username,status,mail_address';
   $query.= ' from '.$prefixeTable.'users';
-  $query.= ' order by status asc, pseudo asc';
+  $query.= ' order by status asc, username asc';
   $query.= ';';
   $result = mysql_query( $query );
@@ -127,5 +128,5 @@
         break;
       }
-      case 'visiteur' :
+      case 'guest' :
       {
         $title.= $lang['adduser_status_guest'];
@@ -138,5 +139,5 @@
     $vtp->addSession( $sub, 'user' );
     // checkbox for mail management if the user has a mail address
-    if ( $row['mail_address'] != '' && $row['pseudo'] != 'visiteur' )
+    if ( $row['mail_address'] != '' and $row['username'] != 'guest' )
     {
       $vtp->addSession( $sub, 'checkbox' );
@@ -145,17 +146,24 @@
     }
     // use a special color for the login of the user ?
-    if ( $row['pseudo'] == $conf['webmaster'] )
+    if ( $row['username'] == $conf['webmaster'] )
     {
       $vtp->setVar( $sub, 'user.color', 'red' );
     }
-    if ( $row['pseudo'] == "visiteur" )
+    if ( $row['username'] == 'guest' )
     {
       $vtp->setVar( $sub, 'user.color', 'green' );
     }
-    $vtp->setVar( $sub, 'user.login', $row['pseudo'] );
+    if ( $row['username'] == 'guest' )
+    {
+      $vtp->setVar( $sub, 'user.login', $lang['guest'] );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'user.login', $row['username'] );
+    }
     // modify or not modify ?
-    if ( $row['pseudo'] == "visiteur"
-         || ( $row['pseudo'] == $conf['webmaster']
-              && $user['pseudo'] != $conf['webmaster'] ) )
+    if ( $row['username'] == 'guest'
+         or ( $row['username'] == $conf['webmaster']
+              and $user['username'] != $conf['webmaster'] ) )
     {
       $vtp->addSession( $sub, 'not_modify' );
@@ -165,12 +173,12 @@
     {
       $vtp->addSession( $sub, 'modify' );
-      $url = './admin.php?page=user_add&amp;mode=modif&amp;user_id=';
+      $url = './admin.php?page=user_modify&amp;user_id=';
       $url.= $row['id'];
       $vtp->setVar( $sub, 'modify.url', add_session_id( $url ) );
-      $vtp->setVar( $sub, 'modify.login', $row['pseudo'] );
+      $vtp->setVar( $sub, 'modify.login', $row['username'] );
       $vtp->closeSession( $sub, 'modify' );
     }
     // manage permission or not ?
-    if ( $row['pseudo'] == $conf['webmaster'] )
+    if ( $row['username'] == $conf['webmaster'] )
     {
       $vtp->addSession( $sub, 'not_permission' );
@@ -182,9 +190,10 @@
       $url = './admin.php?page=perm&amp;user_id='.$row['id'];
       $vtp->setVar( $sub, 'permission.url', add_session_id( $url ) );
-      $vtp->setVar( $sub, 'permission.login', $row['pseudo'] );
+      $vtp->setVar( $sub, 'permission.login', $row['username'] );
       $vtp->closeSession( $sub, 'permission' );
     }
     // is the user deletable or not ?
-    if ( $row['pseudo'] == 'visiteur' || $row['pseudo'] == $conf['webmaster'] )
+    if ( $row['username'] == 'guest'
+         or $row['username'] == $conf['webmaster'] )
     {
       $vtp->addSession( $sub, 'not_delete' );
@@ -196,5 +205,5 @@
       $url = './admin.php?page=user_list&amp;delete='.$row['id'];
       $vtp->setVar( $sub, 'delete.url', add_session_id( $url ) );
-      $vtp->setVar( $sub, 'delete.login', $row['pseudo'] );
+      $vtp->setVar( $sub, 'delete.login', $row['username'] );
       $vtp->closeSession( $sub, 'delete' );
     }
