Bug masque installation validé vide

This commit is contained in:
Fred Tempez 2020-09-08 21:25:42 +02:00
parent 0d5ed4bf8d
commit b36a0f069f
1 changed files with 22 additions and 12 deletions

View File

@ -72,18 +72,27 @@ class install extends common {
$this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]); $this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]); $this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]);
} }
$success = $this->setData([ // Création de l'utilisateur si les données sont complétées.
'user', $success = false;
$userId, if ( $userFirstname
[ AND $userLastname
'firstname' => $userFirstname, AND $userMail
'forgot' => 0, AND $this->getInput('installPassword', helper::FILTER_PASSWORD, true)
'group' => self::GROUP_ADMIN, AND $this->getInput('installConfirmPassword', helper::FILTER_STRING_SHORT, true)
'lastname' => $userLastname, ){
'mail' => $userMail, $success = $this->setData([
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true) 'user',
] $userId,
]); [
'firstname' => $userFirstname,
'forgot' => 0,
'group' => self::GROUP_ADMIN,
'lastname' => $userLastname,
'mail' => $userMail,
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true)
]
]);
}
if ($success === true) { // Formulaire complété envoi du mail if ($success === true) { // Formulaire complété envoi du mail
// Envoie le mail // Envoie le mail
$sent = $this->sendMail( $sent = $this->sendMail(
@ -102,6 +111,7 @@ class install extends common {
// Créer sitemap // Créer sitemap
$this->createSitemap(); $this->createSitemap();
// Valeurs en sortie // Valeurs en sortie
echo helper::baseUrl(false);
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl(false), 'redirect' => helper::baseUrl(false),
'notification' => ($sent === true ? 'Installation terminée' : $sent), 'notification' => ($sent === true ? 'Installation terminée' : $sent),