Jeedom Core

user
in package

Table of Contents

Properties

$_changed  : mixed
$_changes_trace  : mixed
$enable  : mixed
$hash  : string|null
$id  : mixed
$login  : mixed
$options  : mixed
$password  : mixed
$profils  : mixed
$rights  : mixed

Methods

all()  : array<string|int, user>
Get all users
byEnable()  : array<string|int, user>
Search users by enable status
byHash()  : user
Get user by hash
byId()  : user|null
Return user object if exists
byLogin()  : user
Get user by login
byLoginAndHash()  : user
Get user by login and hash
byProfils()  : array<string|int, user>
Search users by profils
cleanExpiredRegisterDevices()  : void
cleanPasswordAndHashInput()  : array<string|int, mixed>
connect()  : user|false
Return user object if login and password are correct, else return false
connectToLDAP()  : mixed
deadCmd()  : array<string|int, mixed>
decrypt()  : void
encrypt()  : void
failedLogin()  : void
getAccessKeyForReport()  : string
getChanged()  : mixed
getEnable()  : mixed
getHash()  : string
getId()  : mixed
getLogin()  : mixed
getOptions()  : mixed
getPassword()  : string
getProfils()  : mixed
getRights()  : mixed
is_Connected()  : bool
isBan()  : bool
isValidAndEnabled()  : bool
isValidRegisteredDevice()  : bool
loginFromResetToken()  : string
postInsert()  : void
postRemove()  : void
postSave()  : void
preInsert()  : void
preRemove()  : void
preSave()  : void
preUpdate()  : void
raiseForInvalidLogin()  : void
refresh()  : void
regenerateHashes()  : mixed
registerDeviceLifetime()  : int
remove()  : bool
removeBanIp()  : void
resetPasswordFromToken()  : bool
save()  : bool
searchByOptions()  : array<string|int, user>
Search users by options
searchByRight()  : array<string|int, user>
Search users by right
sendResetPasswordLink()  : void
setChanged()  : self
setEnable()  : self
setHash()  : mixed
setId()  : self
setLogin()  : self
setOptions()  : mixed
setPassword()  : self
setProfils()  : self
setRights()  : self
supportAccess()  : void
toArray()  : array<string, mixed>
Convert user to array, stripping sensitive data (password hash, 2FA secret)
validateTwoFactorCode()  : mixed
regenerateHash()  : mixed
traceChange()  : void

Properties

$_changes_trace

private mixed $_changes_trace = array()

Methods

all()

Get all users

public static all() : array<string|int, user>
Return values
array<string|int, user> —

Array of all users

byEnable()

Search users by enable status

public static byEnable(bool $_enable) : array<string|int, user>
Parameters
$_enable : bool
Return values
array<string|int, user> —

Array of users with the specified enable status

byHash()

Get user by hash

public static byHash(mixed $_hash) : user
Parameters
$_hash : mixed
Return values
user

byId()

Return user object if exists

public static byId(int|string $_id) : user|null
Parameters
$_id : int|string

user ID

Return values
user|null —

user object if exists, null otherwise

byLogin()

Get user by login

public static byLogin(mixed $_login) : user
Parameters
$_login : mixed
Return values
user

byLoginAndHash()

Get user by login and hash

public static byLoginAndHash(mixed $_login, mixed $_hash) : user
Parameters
$_login : mixed
$_hash : mixed
Return values
user

byProfils()

Search users by profils

public static byProfils(string $_profils[, bool $_enable = false ]) : array<string|int, user>
Parameters
$_profils : string
$_enable : bool = false
Return values
array<string|int, user> —

Array of users with the specified profils

cleanExpiredRegisterDevices()

public static cleanExpiredRegisterDevices() : void

cleanPasswordAndHashInput()

public static cleanPasswordAndHashInput(array<string|int, mixed> $_params) : array<string|int, mixed>
Parameters
$_params : array<string|int, mixed>
Return values
array<string|int, mixed>

connect()

Return user object if login and password are correct, else return false

public static connect(string $_login, string $_pswd) : user|false
Parameters
$_login : string

login

$_pswd : string

password in plain text

Return values
user|false —

object user or false if authentication fails

connectToLDAP()

public static connectToLDAP() : mixed

deadCmd()

public static deadCmd() : array<string|int, mixed>
Return values
array<string|int, mixed>

failedLogin()

public static failedLogin([array<string|int, mixed> $_context = [] ]) : void
Parameters
$_context : array<string|int, mixed> = []

getAccessKeyForReport()

public static getAccessKeyForReport() : string
Return values
string

getHash()

public getHash() : string
Return values
string

getOptions()

public getOptions([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

getPassword()

public getPassword() : string
Return values
string

getRights()

public getRights([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
$_key : mixed = ''
$_default : mixed = ''

is_Connected()

public is_Connected() : bool
Tags
deprecated

Replaced by user::isValidAndEnabled()

Return values
bool

isBan()

public static isBan() : bool
Return values
bool

isValidAndEnabled()

public isValidAndEnabled() : bool
Return values
bool

isValidRegisteredDevice()

public static isValidRegisteredDevice(array<string|int, mixed> $registeredDevices, string $key) : bool
Parameters
$registeredDevices : array<string|int, mixed>
$key : string
Return values
bool

loginFromResetToken()

public static loginFromResetToken(string $_key) : string
Parameters
$_key : string
Return values
string

raiseForInvalidLogin()

public static raiseForInvalidLogin(string $_login) : void
Parameters
$_login : string

regenerateHashes()

public static regenerateHashes() : mixed

registerDeviceLifetime()

public static registerDeviceLifetime() : int
Return values
int

remove()

public remove() : bool
Return values
bool

removeBanIp()

public static removeBanIp() : void

resetPasswordFromToken()

public static resetPasswordFromToken(string $_key, string $_newPassword) : bool
Parameters
$_key : string
$_newPassword : string
Return values
bool

searchByOptions()

Search users by options

public static searchByOptions(string $_search) : array<string|int, user>
Parameters
$_search : string
Return values
array<string|int, user> —

Array of users with the specified options

searchByRight()

Search users by right

public static searchByRight(string $_rights) : array<string|int, user>
Parameters
$_rights : string
Return values
array<string|int, user> —

Array of users with the specified right

public sendResetPasswordLink() : void

setChanged()

public setChanged(mixed $_changed) : self
Parameters
$_changed : mixed
Return values
self

setEnable()

public setEnable(mixed $_enable) : self
Parameters
$_enable : mixed
Return values
self

setHash()

public setHash(string $_hash) : mixed
Parameters
$_hash : string

setId()

public setId(mixed $_id) : self
Parameters
$_id : mixed
Return values
self

setLogin()

public setLogin(mixed $_login) : self
Parameters
$_login : mixed
Return values
self

setOptions()

public setOptions(mixed $_key, mixed $_value) : mixed
Parameters
$_key : mixed
$_value : mixed

setPassword()

public setPassword(string $_password) : self
Parameters
$_password : string
Return values
self

setProfils()

public setProfils(mixed $_profils) : self
Parameters
$_profils : mixed
Return values
self

setRights()

public setRights(mixed $_key, mixed $_value) : self
Parameters
$_key : mixed
$_value : mixed
Return values
self

supportAccess()

public static supportAccess([mixed $_enable = true ]) : void
Parameters
$_enable : mixed = true

toArray()

Convert user to array, stripping sensitive data (password hash, 2FA secret)

public toArray() : array<string, mixed>
Return values
array<string, mixed>

validateTwoFactorCode()

public validateTwoFactorCode(mixed $_code) : mixed
Parameters
$_code : mixed

regenerateHash()

private regenerateHash() : mixed

traceChange()

private traceChange(mixed $old, mixed $new, string $message) : void
Parameters
$old : mixed
$new : mixed
$message : string

        
On this page

Search results