aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorEric <eric@piwigo.org>2009-10-09 15:56:21 +0000
committerEric <eric@piwigo.org>2009-10-09 15:56:21 +0000
commit47ae5c316c5db467af5550d0e31e6fe6b8c20ac4 (patch)
tree11846f3f1c99e0fc444232423d6aa075e860e39f /admin
parentf83b8815c69383e9318e218fadcb14c59a1a0c6d (diff)
[Bug 1041] Switchable double/single password input with text or password type in admin using new $conf
Coding guidelines improvement git-svn-id: http://piwigo.org/svn/trunk@4008 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/user_list.php100
1 files changed, 50 insertions, 50 deletions
diff --git a/admin/user_list.php b/admin/user_list.php
index daac95a8e..38f27e927 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -187,59 +187,59 @@ $page['direction_items'] = array(
// This feature is discussed on Piwigo's english forum
if ($conf['double_password_type_in_admin'] == true)
{
- if (isset($_POST['submit_add']))
- {
- if(empty($_POST['password']))
- {
- array_push($page['errors'], l10n('Password is missing'));
- }
- else if(empty($_POST['password_conf']))
- {
- array_push($page['errors'], l10n('Password confirmation is missing'));
- }
- else if(empty($_POST['email']))
- {
- array_push($page['errors'], l10n('Email address is missing'));
- }
- else if ($_POST['password'] != $_POST['password_conf'])
- {
- array_push($page['errors'], l10n('Password confirmation error'));
- }
- else
- {
- $page['errors'] = register_user(
- $_POST['login'], $_POST['password'], $_POST['email'], false);
-
- if (count($page['errors']) == 0)
- {
- array_push(
- $page['infos'],
- sprintf(
- l10n('user "%s" added'),
- $_POST['login']
- )
- );
- }
- }
- }
+ if (isset($_POST['submit_add']))
+ {
+ if(empty($_POST['password']))
+ {
+ array_push($page['errors'], l10n('Password is missing'));
+ }
+ else if(empty($_POST['password_conf']))
+ {
+ array_push($page['errors'], l10n('Password confirmation is missing'));
+ }
+ else if(empty($_POST['email']))
+ {
+ array_push($page['errors'], l10n('Email address is missing'));
+ }
+ else if ($_POST['password'] != $_POST['password_conf'])
+ {
+ array_push($page['errors'], l10n('Password confirmation error'));
+ }
+ else
+ {
+ $page['errors'] = register_user(
+ $_POST['login'], $_POST['password'], $_POST['email'], false);
+
+ if (count($page['errors']) == 0)
+ {
+ array_push(
+ $page['infos'],
+ sprintf(
+ l10n('user "%s" added'),
+ $_POST['login']
+ )
+ );
+ }
+ }
+ }
}
else if ($conf['double_password_type_in_admin'] == false)
{
- if (isset($_POST['submit_add']))
- {
- $page['errors'] = register_user(
- $_POST['login'], $_POST['password'], $_POST['email'], false);
-
- if (count($page['errors']) == 0)
- {
- array_push(
- $page['infos'],
- sprintf(
- l10n('user "%s" added'),
- $_POST['login']
- )
- );
- }
+ if (isset($_POST['submit_add']))
+ {
+ $page['errors'] = register_user(
+ $_POST['login'], $_POST['password'], $_POST['email'], false);
+
+ if (count($page['errors']) == 0)
+ {
+ array_push(
+ $page['infos'],
+ sprintf(
+ l10n('user "%s" added'),
+ $_POST['login']
+ )
+ );
+ }
}
}