Elgg  Version 4.3
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('installation:adminvalidation:label'),
15  '#help' => elgg_echo('installation:adminvalidation:description'),
16  'name' => 'require_admin_validation',
17  'checked' => (bool) elgg_get_config('require_admin_validation'),
18  'switch' => true,
19 ]);
20 
21 $classes = ['elgg-divide-left', 'plm', 'elgg-admin-users-admin-validation-notification'];
22 if (!(bool) elgg_get_config('require_admin_validation')) {
23  $classes[] = 'hidden';
24 }
25 
27  '#type' => 'select',
28  '#label' => elgg_echo('installation:adminvalidation:notification:label'),
29  '#help' => elgg_echo('installation:adminvalidation:notification:description'),
30  '#class' => $classes,
31  'name' => 'admin_validation_notification',
32  'value' => elgg_get_config('admin_validation_notification'),
33  'options_values' => [
34  '' => elgg_echo('option:no'),
35  'direct' => elgg_echo('installation:adminvalidation:notification:direct'),
36  'daily' => elgg_echo('interval:daily'),
37  'weekly' => elgg_echo('interval:weekly'),
38  ],
39 ]);
40 
42  '#type' => 'number',
43  '#label' => elgg_echo('config:users:remove_unvalidated_users_days'),
44  '#help' => elgg_echo('config:users:remove_unvalidated_users_days:help'),
45  'name' => 'remove_unvalidated_users_days',
46  'value' => elgg_get_config('remove_unvalidated_users_days'),
47  'min' => 0,
48 ]);
49 
51  '#type' => 'checkbox',
52  '#label' => elgg_echo('config:users:can_change_username'),
53  '#help' => elgg_echo('config:users:can_change_username:help'),
54  'name' => 'can_change_username',
55  'checked' => (bool) elgg_get_config('can_change_username'),
56  'switch' => true,
57 ]);
58 
59 echo elgg_view_module('info', elgg_echo('admin:settings:users'), $result);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
$classes
Definition: users.php:21
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_view_module($type, $title, $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:944
$result
Definition: users.php:3
elgg echo
Translates a string.
Definition: deprecated.js:530
elgg_get_config($name, $default=null)
Get an Elgg configuration value.