com\setasign\SetaSite\User
Users Class Users
File: /SetaSite/src/User/Users.php
Class hierarchy
Summary
Properties
$allowNullPasswords
protected Users::$allowNullPasswords
$propertiesConfig
protected \com\setasign\SetaFramework\Config\Config Users::$propertiesConfig
Static Methods
Methods
__construct()
public Users::__construct (
\com\setasign\SetaSite\Config\UserProperties $userPropertiesConfig,
bool $allowNullPasswords,
\com\setasign\SetaFramework\Database\JoinedTable\JoinedTable $table
)bool $allowNullPasswords,
\com\setasign\SetaFramework\Database\JoinedTable\JoinedTable $table
Parameters
- $userPropertiesConfig : \com\setasign\SetaSite\Config\UserProperties
- $allowNullPasswords : bool
- $table : \com\setasign\SetaFramework\Database\JoinedTable\JoinedTable
checkLogin()
public Users::checkLogin (
int $userId,
int $timeout,
?string $sessionId = null,
?string $windowId = null,
bool $onlyActive = true
): Userint $timeout,
?string $sessionId = null,
?string $windowId = null,
bool $onlyActive = true
Parameters
- $userId : int
- $timeout : int
- $sessionId : ?string
- $windowId : ?string
- $onlyActive : bool
Use only active accounts. Param will ignored if $user is set.
Exceptions
Throws InvalidLoginException
getUsernameById()
loadById()
loadByLoginData()
Parameters
- $username : string
- $password : string
- $onlyActive : bool
Exceptions
Throws InvalidLoginException
login()
Login a user.
You will need to save the userId in your session.
Parameters
- $user : User
- $sessionId : string
- $windowId : string
- $remoteAddr : string
Exceptions
Throws UnknownUserException
logout()
Logout a session
Parameters
- $user : int|User
User object or user id
Exceptions
Throws \com\setasign\SetaSite\PropertyContainer\InvalidValueException If the user can't be saved because of an invalid value!
Throws UnknownUserException If the user can't be found!
save()
Parameters
- $user : User
Exceptions
Throws \com\setasign\SetaSite\PropertyContainer\InvalidValueException
