summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/classes/Database.php2
-rw-r--r--core/classes/Request.php2
-rw-r--r--core/classes/authentication/Core/UserManager.php1
-rw-r--r--core/classes/authentication/User.php18
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
*