validation masque de saisie user
This commit is contained in:
parent
7011373627
commit
b6a448ca9b
@ -53,15 +53,8 @@ class user extends common {
|
|||||||
$userFirstname = $this->getInput('userAddFirstname', helper::FILTER_STRING_SHORT, true);
|
$userFirstname = $this->getInput('userAddFirstname', helper::FILTER_STRING_SHORT, true);
|
||||||
$userLastname = $this->getInput('userAddLastname', helper::FILTER_STRING_SHORT, true);
|
$userLastname = $this->getInput('userAddLastname', helper::FILTER_STRING_SHORT, true);
|
||||||
$userMail = $this->getInput('userAddMail', helper::FILTER_MAIL, true);
|
$userMail = $this->getInput('userAddMail', helper::FILTER_MAIL, true);
|
||||||
// Vérification des saisies
|
|
||||||
if (empty($userFirstname)
|
// Stockage des données
|
||||||
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) {
|
|
||||||
$this->setData([
|
$this->setData([
|
||||||
'user',
|
'user',
|
||||||
$userId,
|
$userId,
|
||||||
@ -74,7 +67,7 @@ class user extends common {
|
|||||||
'password' => $this->getInput('userAddPassword', helper::FILTER_PASSWORD, true),
|
'password' => $this->getInput('userAddPassword', helper::FILTER_PASSWORD, true),
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
|
||||||
// Envoie le mail
|
// Envoie le mail
|
||||||
$sent = true;
|
$sent = true;
|
||||||
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {
|
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {
|
||||||
|
Loading…
Reference in New Issue
Block a user