@@ -70,16 +70,6 @@ class User {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user's access level
|
||||
*
|
||||
* @param int $level The access level to set (admin = 1, regular user = 2)
|
||||
* @return void
|
||||
*/
|
||||
private function setAccessLevel($level) {
|
||||
$this->_accessLevel = $level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user's access level
|
||||
*
|
||||
@@ -128,33 +118,6 @@ class User {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the user out
|
||||
*
|
||||
* Resets all user properties to their default values.
|
||||
* Note: This doesn't invalidate the JWT token - handled client-side
|
||||
* by removing the token from storage.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function logout() {
|
||||
// Reset user properties
|
||||
$this->_loggedIn = false;
|
||||
$this->_username = "None";
|
||||
$this->_userId = "0";
|
||||
$this->_accessLevel = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the user is currently logged in
|
||||
*
|
||||
* @return bool True if the user is logged in, false otherwise
|
||||
*/
|
||||
public function isLoggedIn(): bool
|
||||
{
|
||||
return $this->_loggedIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static method to check if a request is authenticated
|
||||
|
Reference in New Issue
Block a user