java.lang.Object
jku.se.UserSession
The
UserSession
class manages the current user session in the application.
It provides static methods to set and retrieve the user who is currently logged in.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic User
Gets the current logged-in user.static void
setCurrentUser
(User user) Sets the current logged-in user.
-
Constructor Details
-
UserSession
public UserSession()
-
-
Method Details
-
setCurrentUser
Sets the current logged-in user.- Parameters:
user
- the user to set as currently logged in
-
getCurrentUser
Gets the current logged-in user.- Returns:
- the current user, or
null
if no user is logged in
-