From 47ae5c316c5db467af5550d0e31e6fe6b8c20ac4 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 9 Oct 2009 15:56:21 +0000 Subject: [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 --- admin/user_list.php | 100 ++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'admin/user_list.php') 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'] + ) + ); + } } } -- cgit v1.2.3