\OCPIUserSession

User session

Summary

Methods
Constants
login()
logout()
setUser()
getUser()
isLoggedIn()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

login()

login(string  $user, string  $password) : boolean

Do a user login

Parameters

string $user

the username

string $password

the password

Returns

boolean —

true if successful

logout()

logout() : void

Logs the user out including all the session data Logout, destroys session

setUser()

setUser(\OCP\IUser|null  $user) 

set the currently active user

Parameters

\OCP\IUser|null $user

getUser()

getUser() : \OCP\IUser|null

get the current active user

Returns

\OCP\IUser|null —

Current user, otherwise null

isLoggedIn()

isLoggedIn() : boolean

Checks whether the user is logged in

Returns

boolean —

if logged in