28 'action_type' =>
'join',
29 'subject_guid' => $event->getObject()->guid,
47 $user = $event->getUserParam();
54 if (
$user->isEnabled()) {
56 $user->disable(
'admin_validation_required', false);
60 $user->setValidationStatus(
false);
64 $session->set(
'admin_validation',
true);
83 'metadata_name_value_pairs' => [
89 if (empty($unvalidated_count)) {
103 foreach ($admins as
$admin) {
104 $notification_preferences =
$admin->getNotificationSettings(
'admin_validation_notification');
105 $notification_preferences = array_keys(array_filter($notification_preferences));
106 if (empty($notification_preferences)) {
113 $site->getDisplayName(),
115 ],
$admin->getLanguage());
118 'action' =>
'admin:unvalidated',
141 $user = $event->getObject();
147 if (
$user->isEnabled() &&
$user->isValidated() !==
false) {
170 if (!
$session->get(
'admin_validation')) {
206 'metadata_name_value_pairs' => [
207 'validated' =>
false,
209 'created_before' =>
"-{$days} days",
212 'batch_inc_offset' =>
false,
217 if (!
$user->delete()) {
$params
Saves global plugin settings.
if(empty($user_guids)) $users
Models an event passed to event handlers.
Generic parent class for login exceptions.
User Validation related events.
static setRegistrationForwardUrl(\Elgg\Event $event)
Set the correct forward url after user registration.
static removeUnvalidatedUsers(\Elgg\Event $event)
Remove unvalidated users after x days.
static preventUserLogin(\Elgg\Event $event)
Prevent unvalidated users from logging in.
static notifyAdminsAboutPendingUsers()
Send a notification to all admins that there are pending user validations.
static checkAdminValidation(\Elgg\Event $event)
Check if new users need to be validated by an administrator.
static addRiverActivityAfterValidation(\Elgg\Event $event)
Adds river activity that a new user joined the site.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
const ELGG_IGNORE_ACCESS
elgg_call() flags
const ELGG_SHOW_DISABLED_ENTITIES
const REFERRER
Used in calls to forward() to specify the browser should be redirected to the referring page.
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags.
elgg_get_admins(array $options=[])
Elgg admin functions.
elgg_count_entities(array $options=[])
Returns a count of entities.
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_get_site_entity()
Get the current site entity.
HTTP response builder interface.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
if(isset($_COOKIE['elggperm'])) $session
notify_user(int|array $to, int $from=0, string $subject='', string $message='', array $params=[], $methods_override=null)
Notify a user via their preferences.
elgg_normalize_url(string $url)
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.
elgg_create_river_item(array $options=[])
Elgg river.
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.
elgg_get_session()
Gets Elgg's session object.