Elgg
Version 2.3
|
Public Member Functions | |
__construct (Conf $config, Database $db, EntityTable $entities, EntityCache $cache, EventsService $events) | |
Constructor. More... | |
getRow ($guid) | |
Return the user specific details of a user by a row. More... | |
disableEntities ($owner_guid) | |
Disables all of a user's entities. More... | |
ban ($user_guid, $reason="") | |
Ban a user (calls events, stores the reason) More... | |
markBanned ($guid, $banned) | |
Mark a user entity banned or unbanned. More... | |
unban ($user_guid) | |
Unban a user (calls events, removes the reason) More... | |
makeAdmin ($user_guid) | |
Makes user $guid an admin. More... | |
removeAdmin ($user_guid) | |
Removes user $guid's admin flag. More... | |
getByUsername ($username) | |
Get user by username. More... | |
getByEmail ($email) | |
Get an array of users from an email address. More... | |
findActive ($options=array(), $limit=10, $offset=0, $count=false) | |
Return users (or the number of them) who have been active within a recent period. More... | |
register ($username, $password, $name, $email, $allow_multiple_emails=false) | |
Registers a user, returning false if the username already exists. More... | |
generateInviteCode ($username) | |
Generates a unique invite code for a user. More... | |
validateInviteCode ($username, $code) | |
Validate a user's invite code. More... | |
setValidationStatus ($user_guid, $status, $method= '') | |
Set the validation status for a user. More... | |
getValidationStatus ($user_guid) | |
Gets the validation status of a user. More... | |
setLastAction (ElggUser $user) | |
Sets the last action time of the given user to right now. More... | |
setLastLogin (ElggUser $user) | |
Sets the last logon time of the given user to right now. More... | |
Protected Attributes | |
$config | |
$db | |
$entities | |
$entity_cache | |
$events | |
$table | |
Definition at line 22 of file UsersTable.php.
Elgg\Database\UsersTable::__construct | ( | Conf | $config, |
Database | $db, | ||
EntityTable | $entities, | ||
EntityCache | $cache, | ||
EventsService | $events | ||
) |
Constructor.
Conf | $config | Config |
Database | $db | Database |
EntityTable | $entities | Entity table |
EntityCache | $cache | Entity cache |
EventsService | $events | Event service |
Definition at line 65 of file UsersTable.php.
Elgg\Database\UsersTable::ban | ( | $user_guid, | |
$reason = "" |
|||
) |
Ban a user (calls events, stores the reason)
int | $user_guid | The user guid |
string | $reason | A reason |
Definition at line 113 of file UsersTable.php.
Elgg\Database\UsersTable::disableEntities | ( | $owner_guid | ) |
Disables all of a user's entities.
int | $owner_guid | The owner GUID |
Definition at line 102 of file UsersTable.php.
Elgg\Database\UsersTable::findActive | ( | $options = array() , |
|
$limit = 10 , |
|||
$offset = 0 , |
|||
$count = false |
|||
) |
Return users (or the number of them) who have been active within a recent period.
array | $options | Array of options with keys: |
seconds (int) => Length of period (default 600 = 10min) limit (int) => Limit (default 10) offset (int) => Offset (default 0) count (bool) => Return a count instead of users? (default false)
Formerly this was the seconds parameter.
int | $limit | Limit (deprecated usage, use $options) |
int | $offset | Offset (deprecated usage, use $options) |
bool | $count | Count (deprecated usage, use $options) |
Definition at line 338 of file UsersTable.php.
Elgg\Database\UsersTable::generateInviteCode | ( | $username | ) |
Generates a unique invite code for a user.
string | $username | The username of the user sending the invitation |
Definition at line 473 of file UsersTable.php.
Elgg\Database\UsersTable::getByEmail | ( | ) |
Get an array of users from an email address.
string | Email address |
Definition at line 303 of file UsersTable.php.
Elgg\Database\UsersTable::getByUsername | ( | $username | ) |
Get user by username.
string | $username | The user's username |
Definition at line 270 of file UsersTable.php.
Elgg\Database\UsersTable::getRow | ( | $guid | ) |
Return the user specific details of a user by a row.
int | $guid | The guid |
Definition at line 84 of file UsersTable.php.
Elgg\Database\UsersTable::getValidationStatus | ( | $user_guid | ) |
Gets the validation status of a user.
int | $user_guid | The user's GUID |
Definition at line 522 of file UsersTable.php.
Elgg\Database\UsersTable::makeAdmin | ( | $user_guid | ) |
Makes user $guid an admin.
int | $user_guid | User guid |
Definition at line 194 of file UsersTable.php.
Elgg\Database\UsersTable::markBanned | ( | $guid, | |
$banned | |||
) |
Mark a user entity banned or unbanned.
int | $guid | User GUID |
bool | $banned | Mark the user banned? |
Definition at line 146 of file UsersTable.php.
Elgg\Database\UsersTable::register | ( | $username, | |
$password, | |||
$name, | |||
$email, | |||
$allow_multiple_emails = false |
|||
) |
Registers a user, returning false if the username already exists.
string | $username | The username of the new user |
string | $password | The password |
string | $name | The user's display name |
string | The user's email address | |
bool | $allow_multiple_emails | Allow the same email address to be registered multiple times? |
RegistrationException |
Definition at line 407 of file UsersTable.php.
Elgg\Database\UsersTable::removeAdmin | ( | $user_guid | ) |
Removes user $guid's admin flag.
int | $user_guid | User GUID |
Definition at line 231 of file UsersTable.php.
Elgg\Database\UsersTable::setLastAction | ( | ElggUser | $user | ) |
Sets the last action time of the given user to right now.
ElggUser | $user | User entity |
Definition at line 538 of file UsersTable.php.
Elgg\Database\UsersTable::setLastLogin | ( | ElggUser | $user | ) |
Sets the last logon time of the given user to right now.
ElggUser | $user | User entity |
Definition at line 582 of file UsersTable.php.
Elgg\Database\UsersTable::setValidationStatus | ( | $user_guid, | |
$status, | |||
$method = '' |
|||
) |
Set the validation status for a user.
int | $user_guid | The user's GUID |
bool | $status | Validated (true) or unvalidated (false) |
string | $method | Optional method to say how a user was validated |
Definition at line 506 of file UsersTable.php.
Elgg\Database\UsersTable::unban | ( | $user_guid | ) |
Unban a user (calls events, removes the reason)
int | $user_guid | Unban a user |
Definition at line 168 of file UsersTable.php.
Elgg\Database\UsersTable::validateInviteCode | ( | $username, | |
$code | |||
) |
Validate a user's invite code.
string | $username | The username |
string | $code | The invite code |
Definition at line 487 of file UsersTable.php.
|
protected |
Definition at line 29 of file UsersTable.php.
|
protected |
Definition at line 34 of file UsersTable.php.
|
protected |
Definition at line 39 of file UsersTable.php.
|
protected |
Definition at line 44 of file UsersTable.php.
|
protected |
Definition at line 49 of file UsersTable.php.
|
protected |
Definition at line 54 of file UsersTable.php.