Elgg  Version master
Public Member Functions | Protected Attributes | List of all members
Elgg\Database\UsersTable Class Reference

Users helper service. More...

Public Member Functions

 __construct (Config $config, Database $db, MetadataTable $metadata)
 Constructor. More...
 
 getByUsername (string $username)
 Get user by username. More...
 
 getByEmail (string $email)
 Get an array of users from an email address. More...
 
 generateInviteCode (string $username)
 Generates a unique invite code for a user. More...
 
 validateInviteCode (string $username, string $code)
 Validate a user's invite code. More...
 

Protected Attributes

 $config
 
 $db
 
 $metadata
 

Detailed Description

Users helper service.

Definition at line 16 of file UsersTable.php.

Constructor & Destructor Documentation

Elgg\Database\UsersTable::__construct ( Config  $config,
Database  $db,
MetadataTable  $metadata 
)

Constructor.

Parameters
Config$configConfig
Database$dbDatabase
MetadataTable$metadataMetadata table

Definition at line 42 of file UsersTable.php.

Member Function Documentation

Elgg\Database\UsersTable::generateInviteCode ( string  $username)

Generates a unique invite code for a user.

Parameters
string$usernameThe username of the user sending the invitation
Returns
string Invite code
See also
self::validateInviteCode()

Definition at line 122 of file UsersTable.php.

Elgg\Database\UsersTable::getByEmail ( string  $email)

Get an array of users from an email address.

Parameters
string$emailEmail address
Returns
[]

Definition at line 94 of file UsersTable.php.

Elgg\Database\UsersTable::getByUsername ( string  $username)

Get user by username.

Parameters
string$usernameThe user's username
Returns
|null Depending on success

Definition at line 55 of file UsersTable.php.

Elgg\Database\UsersTable::validateInviteCode ( string  $username,
string  $code 
)

Validate a user's invite code.

Parameters
string$usernameThe username
string$codeThe invite code
Returns
bool
See also
self::generateInviteCode()

Definition at line 138 of file UsersTable.php.

Member Data Documentation

Elgg\Database\UsersTable::$config
protected

Definition at line 23 of file UsersTable.php.

Elgg\Database\UsersTable::$db
protected

Definition at line 28 of file UsersTable.php.

Elgg\Database\UsersTable::$metadata
protected

Definition at line 33 of file UsersTable.php.


The documentation for this class was generated from the following file: