aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/user_list.php12
-rw-r--r--doc/ChangeLog19
-rw-r--r--include/functions_user.inc.php12
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php1
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php1
-rw-r--r--template/yoga/admin/user_list.tpl6
6 files changed, 41 insertions, 10 deletions
diff --git a/admin/user_list.php b/admin/user_list.php
index 711ef4e40..a81941524 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -188,6 +188,17 @@ $page['filtered_users'] = get_filtered_user_list();
if (isset($_POST['submit_add']))
{
$page['errors'] = register_user($_POST['login'], $_POST['password'], '');
+
+ if (count($page['errors']) == 0)
+ {
+ array_push(
+ $page['infos'],
+ sprintf(
+ l10n('user "%s" added'),
+ $_POST['login']
+ )
+ );
+ }
}
// +-----------------------------------------------------------------------+
@@ -409,7 +420,6 @@ $template->assign_vars(
'L_GROUP_ADD_USER' => $lang['group_add_user'],
'L_SUBMIT'=>$lang['submit'],
'L_STATUS'=>$lang['user_status'],
- 'L_USERNAME' => $lang['login'],
'L_PASSWORD' => $lang['password'],
'L_EMAIL' => $lang['mail_address'],
'L_ORDER_BY' => $lang['order_by'],
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 61d5977b3..a925f9e37 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,10 +1,21 @@
+2005-10-22 Pierrick LE GALL
+
+ * bug 173 fixed: due to phpBB user identifiers management, the
+ method to find the next user identifier has changer to MAX+1.
+
+ * improvement: information message when new user added
+
+ * bug fixed: language item "Username" used instead of "login".
+
2005-10-20 chrisaga
- * bug 176 fixed: need a javascript to handle transparent PNG background in IE
- (tribute to Bob Osola http://homepage.ntlworld.com/bobosola/index.htm
+ * bug 176 fixed: need a javascript to handle transparent PNG
+ background in IE (tribute to Bob Osola
+ http://homepage.ntlworld.com/bobosola/index.htm)
- * display: fixed another IE childselector bug in Categories Management admin page
- and improved display of this page in all browsers too.
+ * display: fixed another IE childselector bug in Categories
+ Management admin page and improved display of this page in all
+ browsers too.
2005-10-18 Pierrick LE GALL
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 25dc3efda..8c02f3324 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -76,8 +76,16 @@ function register_user($login, $password, $mail_address)
// if no error until here, registration of the user
if (count($errors) == 0)
{
+ // what will be the inserted id ?
+ $query = '
+SELECT MAX('.$conf['user_fields']['id'].') + 1
+ FROM '.USERS_TABLE.'
+;';
+ list($next_id) = mysql_fetch_array(pwg_query($query));
+
$insert =
array(
+ $conf['user_fields']['id'] => $next_id,
$conf['user_fields']['username'] => mysql_escape_string($login),
$conf['user_fields']['password'] => $conf['pass_convert']($password),
$conf['user_fields']['email'] => $mail_address
@@ -86,9 +94,9 @@ function register_user($login, $password, $mail_address)
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
- create_user_infos(mysql_insert_id());
+ create_user_infos($next_id);
}
-
+
return $errors;
}
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index a4eef7204..b08a8e230 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -354,6 +354,7 @@ $lang['update_used_metadata'] = 'Used metadata';
$lang['update_wrong_dirname_info'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
$lang['update_wrong_dirname_short'] = 'wrong filename';
$lang['upload'] = 'Upload';
+$lang['user "%s" added'] = 'user "%s" added';
$lang['user_delete'] = 'Delete user';
$lang['user_delete_hint'] = 'Click here to delete this user. Warning! This operation cannot be undone!';
$lang['user_id URL parameter is missing'] = 'user_id URL parameter is missing';
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index cccd8cd23..edf4d2c7d 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -352,6 +352,7 @@ $lang['update_used_metadata'] = 'Méta-données employées';
$lang['update_wrong_dirname_info'] = 'Le nom des répertoires et des fichiers ne doit être constitué que de lettres, de chiffres, de "-", "_" et "."';
$lang['update_wrong_dirname_short'] = 'nom de fichier erroné';
$lang['upload'] = 'Ajout';
+$lang['user "%s" added'] = 'utilisateur "%s" ajouté';
$lang['user_delete'] = 'Supprimer utilisateur';
$lang['user_delete_hint'] = 'Cliquer ici pour supprimer cet utilisateur. Attention : cette opération ne peut pas être annulée !';
$lang['user_id URL parameter is missing'] = 'le paramètre d\'URL "user_id" manque';
diff --git a/template/yoga/admin/user_list.tpl b/template/yoga/admin/user_list.tpl
index 1e1f01087..a3392d6f6 100644
--- a/template/yoga/admin/user_list.tpl
+++ b/template/yoga/admin/user_list.tpl
@@ -8,7 +8,7 @@
<form class="filter" method="post" name="add_user" action="{F_ADD_ACTION}">
<fieldset>
<legend>{lang:Add a user}</legend>
- <label>{L_USERNAME} <input type="text" name="login" maxlength="50" size="20" /></label>
+ <label>{lang:Username} <input type="text" name="login" maxlength="50" size="20" /></label>
<label>{L_PASSWORD} <input type="text" name="password" /></label>
<input type="submit" name="submit_add" value="{L_SUBMIT}" />
</fieldset>
@@ -27,7 +27,7 @@
<legend>{lang:Filter}</legend>
- <label>{lang:username} <input type="text" name="username" value="{F_USERNAME}" /></label>
+ <label>{lang:Username} <input type="text" name="username" value="{F_USERNAME}" /></label>
<label>
{lang:status}
@@ -76,7 +76,7 @@
<table class="table2">
<tr class="throw">
<th>&nbsp;</th>
- <th>{L_USERNAME}</th>
+ <th>{lang:Username}</th>
<th>{L_STATUS}</th>
<th>{L_EMAIL}</th>
<th>{lang:Groups}</th>