Elgg  Version master
users.php
Go to the documentation of this file.
1 <?php
2 
4  '#type' => 'checkbox',
5  '#label' => elgg_echo('installation:registration:label'),
6  '#help' => elgg_echo('installation:registration:description'),
7  'name' => 'allow_registration',
8  'checked' => (bool) elgg_get_config('allow_registration'),
9  'switch' => true,
10 ]);
11 
13  '#type' => 'checkbox',
14  '#label' => elgg_echo('config:users:user_joined_river'),
15  'name' => 'user_joined_river',
16  'checked' => (bool) elgg_get_config('user_joined_river'),
17  'switch' => true,
18 ]);
19 
21  '#type' => 'checkbox',
22  '#label' => elgg_echo('installation:adminvalidation:label'),
23  '#help' => elgg_echo('installation:adminvalidation:description'),
24  'name' => 'require_admin_validation',
25  'checked' => (bool) elgg_get_config('require_admin_validation'),
26  'switch' => true,
27 ]);
28 
29 $classes = ['elgg-divide-left', 'plm', 'elgg-admin-users-admin-validation-notification'];
30 if (!(bool) elgg_get_config('require_admin_validation')) {
31  $classes[] = 'hidden';
32 }
33 
35  '#type' => 'select',
36  '#label' => elgg_echo('installation:adminvalidation:notification:label'),
37  '#help' => elgg_echo('installation:adminvalidation:notification:description'),
38  '#class' => $classes,
39  'name' => 'admin_validation_notification',
40  'value' => elgg_get_config('admin_validation_notification'),
41  'options_values' => [
42  '' => elgg_echo('option:no'),
43  'direct' => elgg_echo('installation:adminvalidation:notification:direct'),
44  'daily' => elgg_echo('interval:daily'),
45  'weekly' => elgg_echo('interval:weekly'),
46  ],
47 ]);
48 
50  '#type' => 'number',
51  '#label' => elgg_echo('config:users:remove_unvalidated_users_days'),
52  '#help' => elgg_echo('config:users:remove_unvalidated_users_days:help'),
53  'name' => 'remove_unvalidated_users_days',
54  'value' => elgg_get_config('remove_unvalidated_users_days'),
55  'min' => 0,
56 ]);
57 
59  '#type' => 'checkbox',
60  '#label' => elgg_echo('config:users:can_change_username'),
61  '#help' => elgg_echo('config:users:can_change_username:help'),
62  'name' => 'can_change_username',
63  'checked' => (bool) elgg_get_config('can_change_username'),
64  'switch' => true,
65 ]);
66 
67 echo elgg_view_module('info', elgg_echo('admin:settings:users'), $result);
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:919
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
$classes
Definition: users.php:29
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$result
Definition: users.php:3