fix : login required not verified on update

This commit is contained in:
BENKE Charlie 2016-06-04 18:15:52 +02:00
parent 4e0f2d624e
commit af8e0802f8

View File

@ -253,7 +253,8 @@ if (empty($reshook))
}
$lastname=$_POST["lastname"];
$firstname=$_POST["firstname"];
$morphy=$morphy=$_POST["morphy"];
$morphy=$_POST["morphy"];
$login=$_POST["login"];
if ($morphy != 'mor' && empty($lastname)) {
$error++;
$langs->load("errors");
@ -264,7 +265,14 @@ if (empty($reshook))
$langs->load("errors");
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors');
}
// Test si le login existe deja
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
if (empty($login)) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Login")), null, 'errors');
}
}
// Create new object
if ($result > 0 && ! $error)
{