diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-30 05:03:23 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-03-30 05:03:23 +0300 |
| commit | 4f2d900af7636e6744ae14aeeefdf2d6080ac50a (patch) | |
| tree | 1f80775437510591656e6ef13375516226ed27f3 /core | |
| parent | a16d070c4f8301a8b68220aca6d3573705be9025 (diff) | |
| download | classroom-4f2d900af7636e6744ae14aeeefdf2d6080ac50a.tar.gz classroom-4f2d900af7636e6744ae14aeeefdf2d6080ac50a.tar.bz2 classroom-4f2d900af7636e6744ae14aeeefdf2d6080ac50a.zip | |
several mail options tested; mailhog (fake) mailer is working
Diffstat (limited to 'core')
| -rw-r--r-- | core/classes/Database.php | 2 | ||||
| -rw-r--r-- | core/classes/Request.php | 2 | ||||
| -rw-r--r-- | core/classes/authentication/Core/UserManager.php | 1 | ||||
| -rw-r--r-- | core/classes/authentication/User.php | 18 |
4 files changed, 3 insertions, 20 deletions
diff --git a/core/classes/Database.php b/core/classes/Database.php index 629753c..8cac479 100644 --- a/core/classes/Database.php +++ b/core/classes/Database.php @@ -74,7 +74,7 @@ class Database { */ public function lastInsertID() { - return $this->connection->insert_id; + return $this->connection->lastInsertId(); } diff --git a/core/classes/Request.php b/core/classes/Request.php index e1148b4..bc322a1 100644 --- a/core/classes/Request.php +++ b/core/classes/Request.php @@ -38,7 +38,7 @@ class Request $this->HOST = $_SERVER['HTTP_HOST']; $this->PORT = $_SERVER['SERVER_PORT']; $this->TIME = $_SERVER['REQUEST_TIME']; - $this->CLI_IP = $_SERVER['REMOTE_ADDR']; + $this->IP = $_SERVER['REMOTE_ADDR']; $this->METHOD = strtolower($_SERVER['REQUEST_METHOD']); diff --git a/core/classes/authentication/Core/UserManager.php b/core/classes/authentication/Core/UserManager.php index a3c1cd5..54cd2cb 100644 --- a/core/classes/authentication/Core/UserManager.php +++ b/core/classes/authentication/Core/UserManager.php @@ -76,6 +76,7 @@ class UserManager implements UserManagerInterface /** createUserToken() * == serializes user and stores it into session + * so $_SESSION[DEFAULT_PREFIX_KEY] has the serialized representaion of user */ public function createUserToken(UserInterface $user): UserTokenInterface { diff --git a/core/classes/authentication/User.php b/core/classes/authentication/User.php index 06f0ddb..babc7fd 100644 --- a/core/classes/authentication/User.php +++ b/core/classes/authentication/User.php @@ -56,14 +56,6 @@ class User implements UserInterface return $this->roles; } - /** getPrivileges - * @return array - */ - public function getPrivileges(): array - { - return $this->privileges; - } - /** isEnabled * @return bool */ @@ -110,16 +102,6 @@ class User implements UserInterface return $this; } - /** setPrivileges() - * - * @param array $roles - * @return User - */ - public function setPrivileges(array $privileges): self - { - $this->privileges = $privileges; - return $this; - } /** setEnabled * |
