69 if (!empty($logged_in_user) && ($logged_in_user->username ===
$username)) {
70 return $logged_in_user;
75 'metadata_name_value_pairs' => [
79 'case_sensitive' =>
false,
101 'metadata_name_value_pairs' => [
105 'case_sensitive' =>
false,
130 'limit' => $this->config->default_limit,
135 foreach ([
'seconds',
'limit',
'offset'] as
$key) {
148 $data =
_elgg_services()->hooks->triggerDeprecated(
'find_active_users',
'system',
$params, null,
"No longer use the 'find_active_users', 'system' hook",
'4.3');
150 if (
$data !== null) {
179 return "{$time}.{$token}";
194 if (!
preg_match(
'~^(\d+)\.([a-zA-Z0-9\-_]+)$~', $code, $matches)) {
197 $time = (int) $matches[1];
$params
Saves global plugin settings.
if(empty($user_guids)) $users
__construct(Config $config, Database $db, MetadataTable $metadata)
Constructor.
findActive(array $options=[])
Return users (or the number of them) who have been active within a recent period. ...
const ELGG_VALUE_INTEGER
Value types.
if(!$annotation instanceof ElggAnnotation) $time
if(elgg_trigger_plugin_hook('usersettings:save', 'user', $hooks_params, true)) foreach($request->validation() ->all() as $item) $data
Database abstraction query builder.
trait TimeUsing
Adds methods for setting the current time (for testing)
getByEmail($email)
Get an array of users from an email address.
getByUsername($username)
Get user by username.
getCurrentTime($modifier= '')
Get the (cloned) time.
validateInviteCode(string $username, string $code)
Validate a user's invite code.
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
generateInviteCode(string $username)
Generates a unique invite code for a user.
compare($x, $comparison, $y=null, $type=null, $case_sensitive=null)
Build value comparison clause.
Extends QueryBuilder with ORDER BY clauses.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
_elgg_services()
Get the global service provider.
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.