Revert "10.3.00 module installation corrections"

This reverts commit 711e5fef44.
This commit is contained in:
Fred Tempez 2020-09-09 16:47:53 +02:00
parent 711e5fef44
commit 61984d5c78

View File

@ -38,7 +38,6 @@ class user extends common {
// Soumission du formulaire
if($this->isPost()) {
$check=true;
$sent = false;
// L'identifiant d'utilisateur est indisponible
$userId = $this->getInput('userAddId', helper::FILTER_ID, true);
if($this->getData(['user', $userId])) {
@ -55,14 +54,12 @@ class user extends common {
$userLastname = $this->getInput('userAddLastname', helper::FILTER_STRING_SHORT, true);
$userMail = $this->getInput('userAddMail', helper::FILTER_MAIL, true);
// Pas de nom saisi
if (empty($userFirstname)
OR empty($userLastname)
OR empty($this->getInput('userAddPassword', helper::FILTER_STRING_SHORT, true))
OR empty($this->getInput('userAddConfirmPassword', helper::FILTER_STRING_SHORT, true)) )
{
if (empty($userFirstname) ||
empty($userLastname) ||
empty($this->getInput('userAddPassword', helper::FILTER_STRING_SHORT, true)) ||
empty($this->getInput('userAddConfirmPassword', helper::FILTER_STRING_SHORT, true))) {
$check=false;
}
// Si tout est ok création effective
if ($check === true) {
$this->setData([
@ -77,7 +74,9 @@ 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) {
$sent = $this->sendMail(
$userMail,
@ -90,7 +89,6 @@ class user extends common {
null
);
}
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'user',