[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
This commit is contained in:
parent
f83b8815c6
commit
47ae5c316c
1 changed files with 48 additions and 48 deletions
|
@ -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 (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 (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 (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 (count($page['errors']) == 0)
|
||||
{
|
||||
array_push(
|
||||
$page['infos'],
|
||||
sprintf(
|
||||
l10n('user "%s" added'),
|
||||
$_POST['login']
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue