Methods

Constructor Function

Users(string $table) 

Parameters

$table

string

The table to use as information source

Creates a new user by specifying its username.

create(string $username) : int

Parameters

$username

string

Specifies the username

Returns

intUserid of created user

Removes the specified user from the database.

deleteUserByID(string $userid) : bool

Parameters

$userid

string

Specifies the user ID

Returns

boolTrue if the delete was successful

Removes the specified user from the database.

deleteUserByUsername($username) : bool

Parameters

$username

Returns

boolTrue if the delete was successful

Returns all users which are accessible by the current user.

getAccessibleUsers(array $perms, bool $includeAdmins) : array

Parameters

$perms

array

Permissions array

$includeAdmins

bool

Flag to get admins (admin and sysadmin) too

Returns

arrayArray of user objects

 Properties

 

DB_Contenido instance

$db : object

access private
 

Storage of the source table to use for the user informations

$table : string

access private