IUserSession¶
-
interface
OCP\IUserSession¶ - User session
Implemented by: OC\User\SessionSource: lib/public/IUserSession.php#45
Methods¶
-
public
OCP\IUserSession::login($uid, $password)¶ - Do a user login
Source: Parameters: - $uid (string) the username
- $password (string) the password
Returns: bool true if successful
Since: 6.0.0
-
public
OCP\IUserSession::logout()¶ - Logs the user out including all the session dataLogout, destroys session
Source: lib/public/IUserSession.php#63 Returns: void Since: 6.0.0
-
public
OCP\IUserSession::setUser($user)¶ - set the currently active user
Source: Parameters: - $user (
OCP\IUser| null)
Since: 8.0.0
- $user (
-
public
OCP\IUserSession::getUser()¶ - get the current active user
Source: lib/public/IUserSession.php#79 Returns: \OCP\IUser| null Current user, otherwise nullSince: 8.0.0
-
public
OCP\IUserSession::isLoggedIn()¶ - Checks whether the user is logged in
Source: lib/public/IUserSession.php#87 Returns: bool if logged in Since: 8.0.0
-
public
OCP\IUserSession::getImpersonatingUserID()¶ - get getImpersonatingUserID
Source: lib/public/IUserSession.php#95 Returns: string | null Since: 18.0.0
-
public
OCP\IUserSession::setImpersonatingUserID($useCurrentUser=true)¶ - set setImpersonatingUserID
Source: lib/public/IUserSession.php#102 Since: 18.0.0