suscribe 2.6
This commit is contained in:
parent
384dc2503b
commit
3736c2ebc9
@ -1,3 +1,7 @@
|
||||
# Version 2.6
|
||||
- Corrige d'un bug empêchat de terminer la procédure d'inscription après approbation.
|
||||
# Version 2.5
|
||||
- Reformatage du formulaire d'approbation pour mettre en avant les actions à réaliser par l'administrateur.
|
||||
# Version 2.4
|
||||
- L'approbation par un administrateur initialise le pseudo avec l'id de l'utilisateur.
|
||||
# Version 2.3
|
||||
|
@ -1 +1 @@
|
||||
{"name":"suscribe","realName":"Auto Inscription","version":"2.4","update":"0.0","delete":true,"dataDirectory":""}
|
||||
{"name":"suscribe","realName":"Auto Inscription","version":"2.6","update":"0.0","delete":true,"dataDirectory":""}
|
@ -15,7 +15,7 @@
|
||||
class suscribe extends common
|
||||
{
|
||||
|
||||
const VERSION = '2.4';
|
||||
const VERSION = '2.6';
|
||||
const REALNAME = 'Auto Inscription';
|
||||
const DELETE = true;
|
||||
const UPDATE = '0.0';
|
||||
@ -146,23 +146,16 @@ class suscribe extends common
|
||||
'mail' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'mail']),
|
||||
'password' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'password']),
|
||||
'tags' => $this->getInput('registrationUserLabel', helper::FILTER_STRING_SHORT),
|
||||
'connectFail' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'connectFail']),
|
||||
'connectTimeout' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'connectTimeout']),
|
||||
'accessUrl' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'accessUrl']),
|
||||
'accessTimer' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'accessTimer']),
|
||||
'accessCsrf' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'accessCsrf'])
|
||||
]
|
||||
]);
|
||||
// Notifier le user uniquement si le groupe est membre au moins membre
|
||||
if ($this->getInput('registrationUserEditGroup') >= 1) {
|
||||
$this->sendMail(
|
||||
$this->getData(['module', $this->getUrl(0), 'users', 'mail']),
|
||||
'Approbation de l\'inscription',
|
||||
'<p>' . $this->getdata(['module', $this->getUrl(0), 'config', 'mailValidateContent']) . '</p>',
|
||||
null,
|
||||
$this->getData(['config', 'smtp', 'from'])
|
||||
);
|
||||
}
|
||||
// Notifier le user
|
||||
$this->sendMail(
|
||||
$this->getData(['module', $this->getUrl(0), 'users', 'mail']),
|
||||
'Approbation de l\'inscription',
|
||||
'<p>' . $this->getdata(['module', $this->getUrl(0), 'config', 'mailValidateContent']) . '</p>',
|
||||
null,
|
||||
$this->getData(['config', 'smtp', 'from'])
|
||||
);
|
||||
// Supprimer le user de la base temporaire,
|
||||
$this->deleteData(['module', $this->getUrl(0), 'users', $this->getUrl(2)]);
|
||||
// Valeurs en sortie
|
||||
@ -411,10 +404,9 @@ class suscribe extends common
|
||||
$check
|
||||
&& $this->getInput('registrationValidPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('registrationValidConfirmPassword', helper::FILTER_STRING_SHORT, true)
|
||||
) {
|
||||
self::$inputNotices['registrationAddConfirmPassword'] = 'Les mots de passe ne sont pas identiques';
|
||||
self::$inputNotices['registrationValidConfirmPassword'] = 'Les mots de passe ne sont pas identiques';
|
||||
$check = false;
|
||||
}
|
||||
|
||||
if ($check) {
|
||||
if (
|
||||
// Pas d'approbation par un administrateur
|
||||
@ -444,8 +436,19 @@ class suscribe extends common
|
||||
// Approbation nécessaire
|
||||
$this->setData(['module', $this->getUrl(0), 'users', $userId, 'status', self::STATUS_ACCOUNT_AWAITING]);
|
||||
$notification = 'L\'inscription doit être approuvée par un administrateur';
|
||||
// Stocker le mot de passe temporairement
|
||||
$this->setData([
|
||||
'module',
|
||||
$this->getUrl(0),
|
||||
'users',
|
||||
$userId,
|
||||
'password',
|
||||
$this->getInput('registrationValidPassword', helper::FILTER_PASSWORD, true),
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => $check ? helper::baseUrl() . $this->getdata(['module', $this->getUrl(0), 'config', 'pageSuccess']) : helper::baseUrl() . $this->getdata(['module', $this->getUrl(0), 'config', 'pageError']),
|
||||
|
@ -16,60 +16,12 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Confirmation de l'inscription</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('registrationUserEditFirstname', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Prénom',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'firstname']),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('registrationUserEditLastname', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Nom',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'lastname']),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::mail('registrationUserEditMail', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Adresse électronique',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'mail']),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col8">
|
||||
<?php echo template::text('registrationUserState', [
|
||||
'label' => 'État de l\'inscription',
|
||||
'value' => $module::$statusGroups[$this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'status'])],
|
||||
'disabled' => true,
|
||||
'help' => 'En attente : le mail n\'a pas encore été validé<br>Email validé : approbation nécessaire.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('registrationUsertimer', [
|
||||
'label' => 'Date de demande',
|
||||
'value' => helper::dateUTF8(date('Y-m-d G:i'), $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'timer'])),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4>Approbation de l'inscription</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::text('registrationUserLabel', [
|
||||
'label' => 'Étiquette'
|
||||
'label' => 'Étiquettes',
|
||||
'help' => 'Les étiquettes sont séparées par des espaces',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
@ -137,4 +89,60 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Identité du compte</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('registrationUserEditFirstname', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Prénom',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'firstname']),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('registrationUserEditLastname', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Nom',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'lastname']),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::mail('registrationUserEditMail', [
|
||||
'autocomplete' => 'off',
|
||||
'label' => 'Adresse électronique',
|
||||
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'mail']),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col8">
|
||||
<?php echo template::text('registrationUserState', [
|
||||
'label' => 'État de l\'inscription',
|
||||
'value' => $module::$statusGroups[$this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'status'])],
|
||||
'disabled' => true,
|
||||
'help' => 'En attente : le mail n\'a pas encore été validé<br>Email validé : approbation nécessaire.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('registrationUsertimer', [
|
||||
'label' => 'Date de demande',
|
||||
'value' => helper::dateUTF8(date('Y-m-d G:i'), $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'timer'])),
|
||||
'disabled' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
Loading…
Reference in New Issue
Block a user