validation masque de saisie user

This commit is contained in:
Prof Langues 2020-09-24 11:34:26 +02:00
parent 7011373627
commit b6a448ca9b

View File

@ -53,15 +53,8 @@ class user extends common {
$userFirstname = $this->getInput('userAddFirstname', helper::FILTER_STRING_SHORT, true);
$userLastname = $this->getInput('userAddLastname', helper::FILTER_STRING_SHORT, true);
$userMail = $this->getInput('userAddMail', helper::FILTER_MAIL, true);
// Vérification des saisies
if (empty($userFirstname)
AND empty($userLastname)
AND empty($this->getInput('userAddPassword', helper::FILTER_STRING_SHORT, true))
AND empty($this->getInput('userAddConfirmPassword', helper::FILTER_STRING_SHORT, true))) {
$check = false;
}
// Si tout est ok création effective
if ($check === true) {
// Stockage des données
$this->setData([
'user',
$userId,
@ -74,7 +67,7 @@ class user extends common {
'password' => $this->getInput('userAddPassword', helper::FILTER_PASSWORD, true),
]
]);
}
// Envoie le mail
$sent = true;
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {