Index: /extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php	(revision 6775)
@@ -101,5 +101,5 @@
   case 'global':
 
-	if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']))
+	if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']))
   {
 
@@ -140,5 +140,6 @@
       $_POST['UAM_GhostTracker_ReminderText'],
       $_POST['UAM_Add_LastVisit_Column'],
-      $_POST['UAM_Admin_ConfMail']);
+      $_POST['UAM_Admin_ConfMail'],
+      $_POST['UAM_RedirToProfile']);
 
     $conf['UserAdvManager'] = serialize($newconf_UAM);
@@ -331,4 +332,6 @@
     'UAM_ADMINCONFMAIL_TRUE'         => $conf_UAM[20]=='true' ?  'checked="checked"' : '' ,
     'UAM_ADMINCONFMAIL_FALSE'        => $conf_UAM[20]=='false' ?  'checked="checked"' : '' ,
+    'UAM_REDIRTOPROFILE_TRUE'        => $conf_UAM[21]=='true' ?  'checked="checked"' : '' ,
+    'UAM_REDIRTOPROFILE_FALSE'       => $conf_UAM[21]=='false' ?  'checked="checked"' : '' ,
 		'UAM_PASSWORD_TEST_SCORE'        => $UAM_Password_Test_Score,
     'UAM_ERROR_REPORTS4'             => $UAM_Exclusionlist_Error,
Index: /extensions/NBC_UserAdvManager/trunk/admin/template/global.tpl
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/admin/template/global.tpl	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/admin/template/global.tpl	(revision 6775)
@@ -497,4 +497,9 @@
             <input type="radio" value="false" {$UAM_NO_COMMENT_ANO_FALSE} name="UAM_No_Comment_Anonymous">{'UAM_No_Comment_Anonymous_false'|@translate}<br>
             <input type="radio" value="true" {$UAM_NO_COMMENT_ANO_TRUE} name="UAM_No_Comment_Anonymous">{'UAM_No_Comment_Anonymous_true'|@translate}<br><br>
+          </li>
+
+          <li><label class="cluetip" title="{'UAM_RedirTitle'|translate}|{'UAM_RedirTitle_d'|translate}">{'UAM_RedirToProfile'|@translate}</label><br><br>
+            <input type="radio" value="false" {$UAM_REDIRTOPROFILE_FALSE} name="UAM_RedirToProfile">{'UAM_RedirToProfile_false'|@translate}<br>
+            <input type="radio" value="true" {$UAM_REDIRTOPROFILE_TRUE} name="UAM_RedirToProfile">{'UAM_RedirToProfile_true'|@translate}<br><br>
           </li>
         </ul>
Index: /extensions/NBC_UserAdvManager/trunk/changelog.txt.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/changelog.txt.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/changelog.txt.php	(revision 6775)
@@ -179,5 +179,7 @@
             Bug 1656 fixed - New register validation mode: Manual validation by admin
             Bug 1687 fixed - Login case sensitivity is no more used in this plugin because already set in Piwigo's core
-            Bug 1693 
+            Bug 1727 partially fixed - New option to redirect users to profile page after their first login only.
+              Known problem: The redirection doesn't work after registration and after confirmation page (if ConfirmMail is enabled)
+                             The redirection applies to already registered users including admins, webmaster and generic status.
             Bug 1789 fixed - Escaping double quotes in text fields
             Bug 1790 fixed - Validation tracking tab is set when correct options are set
Index: /extensions/NBC_UserAdvManager/trunk/include/functions.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/include/functions.inc.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/include/functions.inc.php	(revision 6775)
@@ -498,4 +498,31 @@
   pwg_query($query);
 }
+
+
+/* Function called from main.inc.php - Triggered on user deletion */
+function DeleteRedir($user_id)
+{
+  $tab = array();
+
+  $query = "
+SELECT value
+FROM ".CONFIG_TABLE."
+WHERE param = 'UserAdvManager_Redir'
+;";
+
+  $tab = pwg_db_fetch_row(pwg_query($query));
+  
+  $values = explode(',', $tab[0]);
+
+  unset($values[array_search($user_id, $values)]);
+     
+  $query = "
+UPDATE ".CONFIG_TABLE."
+SET value = \"".implode(',', $values)."\"
+WHERE param = 'UserAdvManager_Redir';";
+
+  pwg_query($query);
+}
+
 
 /* Function called from ConfirmMail.php to verify validation key used by user according time limit */
@@ -1185,3 +1212,32 @@
   }
 }
+
+
+// check_consult - Thx to LucMorizur
+// checks if a user id is registered as having already
+// visited his profile.php page.
+// @uid        : the user id
+// @user_idsOK : (returned) array of all users ids having already visited
+//               their profile.php pages
+//
+// @returns    : true or false whether the users has already visited his
+//               profile.php page or not
+function check_consult($uid, &$user_idsOK)
+{
+  $t = array();
+  $v = false;
+  
+  $query = "
+SELECT value
+FROM ".CONFIG_TABLE."
+WHERE param = 'UserAdvManager_Redir'
+;";
+  
+  if ($v = (($t = pwg_db_fetch_row(pwg_query($query))) !== false))
+  {
+    $user_idsOK = explode(',', $t[0]);
+    $v = (in_array($uid, $user_idsOK));
+  }
+  return $v;
+}
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php	(revision 6775)
@@ -247,5 +247,5 @@
   $Newconf_UAM[19] = $Newconf_UAM[20];
   $Newconf_UAM[20] = $Newconf_UAM[21];
-  unset($Newconf_UAM[21]);
+  $Newconf_UAM[21] = 'false';
   
   $update_conf = serialize($Newconf_UAM);
@@ -258,5 +258,12 @@
 		;';
 
-		pwg_query($query);
+	pwg_query($query);
+
+  $query = '
+INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
+VALUES ("UserAdvManager_Redir","0","UAM Redirections")
+  ;';
+  
+  pwg_query($query);
 }
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/de_DE/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/de_DE/help/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/de_DE/help/plugin.lang.php	(revision 6775)
@@ -169,5 +169,4 @@
 /*TODO*/$lang['UAM_confirmmailTitle_d'] = 'This option allows a user to either confirm registration by clicking on a link received in an email sent upon registration or the administrator to manually activate the registration.<br><br>
 In first case, the e-mail is composed of a customizable part to introduce a little welcome note and a fixed part containing the activation link that is generated from a random key that can possibly regenerate through the &quot;Tracking validations&quot; tab.<br><br>
-Dans le premier cas, le message envoyé comprend une partie fixe, avec le lien d\'activation généré à partir d\'une clef aléatoire (cette clé peut éventuellement être régénérée via l\'onglet &quot;Suivi des validations&quot;), et une partie personnalisable par un texte d\'accueil.
 <br><br>
 In second case, <b><u>there is no validation key send by email!</u></b>. Visitors have to wait until an administrator validate them himself in &quot;Validation tracking&quot; tab. It\s recommanded to activate the Piwigo\'s option &quot;Email admins when a new user registers&quot; (see in Piwigo\'s configuration options) and to use the &quot;Information email to user&quot; to warn new registers to wait on their account activation.
@@ -176,4 +175,7 @@
 <br><br>
 Diese Option ist in der Regel mit der automatischen Zuordnung der Gruppe und / oder Satzung verwendet. Zum Beispiel, ein Benutzer, der nicht validiert ihre Eintragung in eine bestimmte Gruppe von Nutzern eingestellt werden (mit oder ohne Einschr&auml;nkungen auf der Galerie), w&auml;hrend ein Benutzer, der seine Registrierung best&auml;tigt wird in einem &quot;normalen&quot; Gruppe eingestellt werden.';
+$lang['UAM_RedirTitle'] = 'Umleitung auf &quot;Benutzerdaten&quot; Seite';
+$lang['UAM_RedirTitle_d'] = 'Diese Option automatisch umleiten ein registrierter Benutzer zum sein Benutzerdaten Seite nur bei seinem ersten Anschluss an die Galerie.<br><br>
+Bitte beachten Sie: Diese Funktion gilt für alle bereits registrierten Nutzern einschließlich derjenigen mit &quot;admin&quot;, &quot;Webmaster&quot; oder &quot;Generic&quot; Status.';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php	(revision 6775)
@@ -265,7 +265,10 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-/*TODO*/$lang['Force_Validation'] = 'Manual validation';
-/*TODO*/$lang['UAM_Confirm_Mail_true'] = ' Enable - Validation by user';
-/*TODO*/$lang['UAM_Confirm_Mail_local'] = ' Enable - Validation by admin (no validation key sent)';
+$lang['Force_Validation'] = 'Handbuch Validierung';
+$lang['UAM_Confirm_Mail_true'] = ' Aktivieren - Validation von Benutzer';
+$lang['UAM_Confirm_Mail_local'] = ' Aktivieren - Validation von admin (keine Validierung Key gesendet)';
+$lang['UAM_RedirToProfile'] = 'Umleitung auf "Benutzerdaten" Seite';
+$lang['UAM_RedirToProfile_false'] = ' Deaktivieren (Standard)';
+$lang['UAM_RedirToProfile_true'] = ' Aktivieren';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/en_UK/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/en_UK/help/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/en_UK/help/plugin.lang.php	(revision 6775)
@@ -175,4 +175,7 @@
 <br><br>
 This option is generally used with the automatic assignment of group and/or statutes. For example, a user who has not validated their registration will be set in a specific group of users (with or without restrictions on the gallery) while a user who validated his registration shall be set in a &quot;normal&quot; group.';
+$lang['UAM_RedirTitle'] = 'Redirect to &quot;Customization&quot; page';
+$lang['UAM_RedirTitle_d'] = 'This option automatically redirect a registered user to his customization page only at his first connection to the gallery.<br><br>
+Please note: This feature applies to all already registered users including those with &quot;admin&quot;, &quot;webmaster&quot; or &quot;generic&quot; status.';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php	(revision 6775)
@@ -265,4 +265,7 @@
 $lang['UAM_Confirm_Mail_true'] = ' Enable - Validation by user';
 $lang['UAM_Confirm_Mail_local'] = ' Enable - Validation by admin (no validation key sent)';
+$lang['UAM_RedirToProfile'] = 'Redirect to "Customization" page';
+$lang['UAM_RedirToProfile_false'] = ' Disable (default)';
+$lang['UAM_RedirToProfile_true'] = ' Enable';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/es_ES/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/es_ES/help/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/es_ES/help/plugin.lang.php	(revision 6775)
@@ -176,4 +176,7 @@
 <br><br>
 Esta opci&oacute;n se utiliza generalmente con la asignaci&oacute;n autom&aacute;tica de grupo y / o estatutos. Por ejemplo, un usuario que no ha validado su registro se encuentra en un grupo espec&iacute;fico de usuarios (con o sin restricciones a la galer&iacute;a) mientras que un usuario que haya validado su registro se encuentra en un &quot;normal&quot; del grupo.';
+$lang['UAM_RedirTitle'] = 'Redirigir a la página de &quot;personalizaci&oacute;n&quot;';
+$lang['UAM_RedirTitle_d'] = 'Esta opción se redireccionan automáticamente un usuario registrado para su página de personalización sólo en su primera conexión a la galería.<br><br>
+Atención: Esta característica se aplica a todos los usuarios ya registrados, incluidos aquellos con estados &quot;admin&quot;, &quot;webmaster&quot; o &quot;generic&quot;.';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php	(revision 6775)
@@ -264,7 +264,10 @@
 
 // --------- Starting below: New or revised $lang ---- from version 2.15.4
-/*TODO*/$lang['Force_Validation'] = 'Manual validation';
-/*TODO*/$lang['UAM_Confirm_Mail_true'] = ' Enable - Validation by user';
-/*TODO*/$lang['UAM_Confirm_Mail_local'] = ' Enable - Validation by admin (no validation key sent)';
+$lang['Force_Validation'] = 'Validación manual';
+$lang['UAM_Confirm_Mail_true'] = ' Activar - La validación por el usuario';
+$lang['UAM_Confirm_Mail_local'] = ' Activar - La validación por el administrador (sin clave de validación enviado)';
+$lang['UAM_RedirToProfile'] = 'Redirigir a la página de "personalización"';
+$lang['UAM_RedirToProfile_false'] = ' Desactivar (por defecto)';
+$lang['UAM_RedirToProfile_true'] = ' Activar';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php	(revision 6775)
@@ -171,4 +171,7 @@
 <br><br>
 Cette option est généralement utilisée avec  l\'attribution automatique de groupe et/ou de statut. Selon qu\'il a validé ou non son inscription, il est en effet possible d\'affecter à l\'utilisateur un groupe différent, avec plus ou moins de restrictions d\'accès à la galerie.';
+$lang['UAM_RedirTitle'] = 'Redirection vers la page &quot;Personnalisation&quot;';
+$lang['UAM_RedirTitle_d'] = 'Cette option permet de rediriger automatiquement un utilisateur inscrit vers sa page de personnalisation uniquement lors de sa première connexion à la galerie.<br><br>
+A savoir: Cette fonction s\'applique également à tous les utilisateurs déjà inscrits, y compris ceux disposant du status &quot;admin&quot;, &quot;webmaster&quot; ou &quot;generique&quot;.';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php	(revision 6775)
@@ -264,4 +264,7 @@
 $lang['UAM_Confirm_Mail_true'] = ' Activer - Validation par le visiteur';
 $lang['UAM_Confirm_Mail_local'] = ' Activer - Validation par l\'administrateur (pas d\'envoi de clé de validation)';
+$lang['UAM_RedirToProfile'] = 'Redirection vers la page "Personnalisation"';
+$lang['UAM_RedirToProfile_false'] = ' Désactiver (valeur par défaut)';
+$lang['UAM_RedirToProfile_true'] = ' Activer';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/it_IT/help/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/it_IT/help/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/it_IT/help/plugin.lang.php	(revision 6775)
@@ -172,4 +172,7 @@
 <br><br>
 Questa opzione &egrave; generalmente utilizzato con l\'assegnazione automatica di gruppo e / o statuto. Ad esempio, un utente che non ha convalidato la loro registrazione sar&agrave; ambientato in un gruppo specifico di utenti (con o senza le restrizioni alla galleria), mentre un utente che ha convalidato la sua registrazione &egrave; fissato in un &quot;normale&quot; del gruppo.';
+/*TODO*/$lang['UAM_RedirTitle'] = 'Redirect to &quot;Customization&quot; page';
+/*TODO*/$lang['UAM_RedirTitle_d'] = 'This option automatically redirect a registered user to his customization page only at his first connection to the gallery.<br><br>
+Please note: This feature applies to all already registered users including those with &quot;admin&quot;, &quot;webmaster&quot; or &quot;generic&quot; status.';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php	(revision 6775)
@@ -267,4 +267,7 @@
 /*TODO*/$lang['UAM_Confirm_Mail_true'] = ' Enable - Validation by user';
 /*TODO*/$lang['UAM_Confirm_Mail_local'] = ' Enable - Validation by admin (no validation key sent)';
+/*TODO*/$lang['UAM_RedirToProfile'] = 'Redirect to "Customization" page';
+$lang['UAM_RedirToProfile_false'] = ' Disattivare (di default)';
+$lang['UAM_RedirToProfile_true'] = ' Attivare';
 // --------- End: New or revised $lang ---- from version 2.15.4
 ?>
Index: /extensions/NBC_UserAdvManager/trunk/main.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/main.inc.php	(revision 6775)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: UserAdvManager
-Version: 2.15.4b
+Version: 2.15.4
 Description: Renforcer la gestion des utilisateurs - Enforce users management
 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
@@ -13,6 +13,4 @@
 /*
  ***** TODO List *****
-++ Adding ASC and DESC ordering for user's lists tables (Ghost Tracker, UserList and Unvalidated) ?
-
 ++ No validation needed for admins users comments (new trigger needed in comments.php ?)
 
@@ -177,4 +175,6 @@
   /* Cleanup for LastVisit table */
   DeleteLastVisit($user_id);
+  /* Cleanup Redirection settings */
+  DeleteRedir($user_id);
 }
 
@@ -320,4 +320,20 @@
 
     $conf_UAM = unserialize($conf['UserAdvManager']);
+
+    if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
+    {
+      $user_idsOK = array();
+      if (!check_consult($user['id'], $user_idsOK))
+      {
+        $user_idsOK[] = $user['id'];
+        
+        $query = "
+          UPDATE ".CONFIG_TABLE."
+          SET value = \"".implode(',', $user_idsOK)."\"
+          WHERE param = 'UserAdvManager_Redir';";
+          
+        pwg_query($query);
+      }
+    }
 
     if (isset($_POST['validate']) and !is_admin())
@@ -399,4 +415,26 @@
 
 
+// RedirectToProfile - Thx to LucMorizur
+// redirects a visitor (not generic (forbidden) neither admin) to his
+// profile.php page
+//
+// no variable, no return
+add_event_handler('login_success', 'RedirectToProfile');
+
+function RedirectToProfile()
+{
+  global $conf, $user;
+  
+  $conf_UAM = unserialize($conf['UserAdvManager']);
+
+  if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true'))
+  {
+    $user_idsOK = array();
+    if (!check_consult($user['id'], $user_idsOK))
+      redirect(PHPWG_ROOT_PATH.'profile.php');
+  }
+}
+
+
 add_event_handler('init', 'UAM_InitPage');
 /* *** Important ! This is necessary to make email exclusion work in admin's users management panel *** */
Index: /extensions/NBC_UserAdvManager/trunk/maintain.inc.php
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/maintain.inc.php	(revision 6774)
+++ /extensions/NBC_UserAdvManager/trunk/maintain.inc.php	(revision 6775)
@@ -18,5 +18,5 @@
 	global $conf;
 	
-  $default1 = array('false','false','false',-1,-1,-1,'false','false','',-1,'','','false','','false',100,'false','false',10,'Hello.
+  $default1 = array('false','false',-1,-1,-1,'false','false','',-1,'','','false','','false',100,'false','false',10,'Hello.
 	
 This is a reminder because a very long time passed since your last visit on our gallery. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted.
@@ -48,4 +48,10 @@
 INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
 VALUES ("UserAdvManager_ConfirmMail","'.addslashes(serialize($default2)).'","UAM ConfirmMail parameters")
+  ;';
+  pwg_query($q);
+  
+  $q = '
+INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
+VALUES ("UserAdvManager_Redir","0","UAM Redirections")
   ;';
   pwg_query($q);
@@ -160,31 +166,16 @@
   }
 
-/* Check if old version is > 2.15 */
-/* ****************************** */
-// In preparation of next releases
-   $query = '
+/* Old version is > 2.15 */
+/* ********************* */
+	$query = '
 SELECT param
   FROM '.CONFIG_TABLE.'
-WHERE param LIKE "UserAdvManager%"
+WHERE param = "UserAdvManager_Redir"
 ;';
   $count = pwg_db_num_rows(pwg_query($query));
   
-  if ($count == 2)
-  {
-    $query = '
-SELECT value
-  FROM '.CONFIG_TABLE.'
-WHERE param = "UserAdvManager"
-;';
-
-    $result = pwg_query($query);
-    $conf = pwg_db_fetch_assoc($result);
-    
-    $conf_UAM = unserialize($conf['value']);
-    $Nb_values = count($conf_UAM);
-    if ($Nb_values = 22)
-    {
-      upgrade_2153_2154();
-    }
+  if ($count == 0)
+  {
+    upgrade_2153_2154();
   }
 
Index: tensions/NBC_UserAdvManager/trunk/obsolete.list
===================================================================
--- /extensions/NBC_UserAdvManager/trunk/obsolete.list	(revision 6774)
+++ 	(revision )
@@ -1,6 +1,0 @@
-admin/ghosttracker.tpl
-admin/global.tpl
-admin/uam.css
-admin/userlist.tpl
-admin/usermanager.tpl
-ConfirmMail.tpl
