mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 08:56:27 +02:00
update settings
This commit is contained in:
parent
a99e159b1f
commit
9b7b78b306
12 changed files with 92 additions and 52 deletions
|
@ -17,6 +17,7 @@ namespace controllers\publics;
|
|||
class Connect extends \descartes\Controller
|
||||
{
|
||||
private $internal_user;
|
||||
private $internal_setting;
|
||||
|
||||
/**
|
||||
* Cette fonction est appelée avant toute les autres :.
|
||||
|
@ -28,6 +29,7 @@ namespace controllers\publics;
|
|||
$bdd = \descartes\Model::_connect(DATABASE_HOST, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD);
|
||||
|
||||
$this->internal_user = new \controllers\internals\User($bdd);
|
||||
$this->internal_setting = new \controllers\internals\Setting($bdd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,6 +64,9 @@ namespace controllers\publics;
|
|||
return $this->redirect(\descartes\Router::url('Connect', 'login'));
|
||||
}
|
||||
|
||||
$settings = $this->internal_setting->gets_for_user($user['id']);
|
||||
$user['settings'] = $settings;
|
||||
|
||||
$_SESSION['connect'] = true;
|
||||
$_SESSION['user'] = $user;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue