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);
66 self::notifyAdminsAboutPendingUsers();
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)) {
110 $subject =
elgg_echo(
'admin:notification:unvalidated_users:subject', [
$site->getDisplayName()], $admin->getLanguage());
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()) {
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
User Validation related events.
HTTP response builder interface.
$params
Saves global plugin settings.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
Generic parent class for login exceptions.
if(empty($user_guids)) $users
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.
elgg_get_session()
Gets Elgg's session object.
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
elgg_create_river_item(array $options=[])
Elgg river.
static removeUnvalidatedUsers(\Elgg\Event $event)
Remove unvalidated users after x days.
elgg_get_admins(array $options=[])
Elgg admin functions.
const ELGG_IGNORE_ACCESS
elgg_call() flags
static preventUserLogin(\Elgg\Event $event)
Prevent unvalidated users from logging in.
const REFERRER
Used in calls to forward() to specify the browser should be redirected to the referring page...
const ELGG_SHOW_DISABLED_ENTITIES
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_count_entities(array $options=[])
Returns a count of entities.
static addRiverActivityAfterValidation(\Elgg\Event $event)
Adds river activity that a new user joined the site.
elgg_get_site_entity()
Get the current site entity.
if(isset($_COOKIE['elggperm'])) $session
static setRegistrationForwardUrl(\Elgg\Event $event)
Set the correct forward url after user registration.
notify_user(int|array $to, int $from=0, string $subject= '', string $message= '', array $params=[], $methods_override=null)
Notify a user via their preferences.
foreach($plugin_guids as $guid) if(empty($deactivated_plugins)) $url
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.
elgg_normalize_url(string $url)
Login as the specified user.
Models an event passed to event handlers.