Merge pull request #5295 from defrance/patch-7
fix : login required not verified on update
This commit is contained in:
commit
5b43608971
@ -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)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user