summaryrefslogtreecommitdiff
path: root/includes/Session.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Session.php')
-rw-r--r--includes/Session.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/Session.php b/includes/Session.php
index 7e17527..a9c1dc7 100644
--- a/includes/Session.php
+++ b/includes/Session.php
@@ -18,9 +18,11 @@ class Session
return self::$instance;
}
- public function sign_in()
+ public function sign_in(User $user)
{
$_SESSION['signed_in'] = true;
+ $_SESSION['user_id'] = $user->id;
+ $_SESSION['user_name'] = $user->name;
}
public function is_signed_in(): bool
@@ -30,8 +32,6 @@ class Session
public function get_current_user()
{
- include_once 'db_inc.php';
-
// There is no current user
if (!$this->is_signed_in()) {
return null;