Methods

Constructor Function

Users(string $table) 

Parameters

$table

string

The table to use as information source

create ($username) creates a new user by specifying its username

create(string $username) : int

Parameters

$username

string

Specifies the username

Returns

intuserid of created user

deleteUserByID ($userid) 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

deleteUserByUsername ($username) Removes the specified user from the database

deleteUserByUsername($username) : bool

Parameters

$username

Returns

boolTrue if the delete was successful

getAccessibleUsers Returns all users which are accessible by the current user

getAccessibleUsers($perms, $includeAdmins) : array

Parameters

$perms

$includeAdmins

Returns

arrayArray of user objects

 Properties

 

$db : object
access private
 

$table : string
access private