Régénere la session à l'installation et au login
This commit is contained in:
parent
28e8af3f1f
commit
5fdb0c8ff5
@ -50,7 +50,9 @@ class install extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Accès autorisé
|
||||
|
||||
|
||||
|
||||
// Soumission du formulaire
|
||||
if ($this->isPost()) {
|
||||
$lang = $this->getInput('installLanguage');
|
||||
@ -64,6 +66,9 @@ class install extends common
|
||||
]);
|
||||
}
|
||||
|
||||
// Régénère la session
|
||||
session_regenerate_id();
|
||||
|
||||
// Liste des langues UI disponibles
|
||||
if (is_dir(self::I18N_DIR)) {
|
||||
foreach ($this->getData(['languages']) as $lang => $value) {
|
||||
|
@ -531,6 +531,10 @@ class user extends common
|
||||
if ($this->getData(['config', 'connect', 'log'])) {
|
||||
file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND);
|
||||
}
|
||||
|
||||
// Régénère la session
|
||||
session_regenerate_id();
|
||||
|
||||
// Stockage des cookies
|
||||
if (!empty($_COOKIE['ZWII_USER_ID'])) {
|
||||
self::$userId = $_COOKIE['ZWII_USER_ID'];
|
||||
@ -679,15 +683,18 @@ class user extends common
|
||||
// Enregistre le user
|
||||
$create = $this->setData([
|
||||
'user',
|
||||
$userId, [
|
||||
$userId,
|
||||
[
|
||||
'firstname' => $item['prenom'],
|
||||
'forgot' => 0,
|
||||
'group' => $item['groupe'],
|
||||
'lastname' => $item['nom'],
|
||||
'mail' => $item['email'],
|
||||
'pseudo' => $item['prenom'],
|
||||
'signature' => 1, // Pseudo
|
||||
'password' => uniqid(), // A modifier à la première connexion
|
||||
'signature' => 1,
|
||||
// Pseudo
|
||||
'password' => uniqid(),
|
||||
// A modifier à la première connexion
|
||||
"connectFail" => null,
|
||||
"connectTimeout" => null,
|
||||
"accessUrl" => null,
|
||||
@ -754,7 +761,8 @@ class user extends common
|
||||
/**
|
||||
* Télécharge un modèle
|
||||
*/
|
||||
public function template() {
|
||||
public function template()
|
||||
{
|
||||
$file = 'template.csv';
|
||||
$path = 'core/module/user/ressource/';
|
||||
// Téléchargement du CSV
|
||||
|
Loading…
Reference in New Issue
Block a user