Elgg  Version master
notifications.php
Go to the documentation of this file.
1 <?php
9 
10 // notify admins about add/remove of another admin
12  '#type' => 'checkbox',
13  '#label' => elgg_echo('admin:security:settings:notify_admins'),
14  '#help' => elgg_echo('admin:security:settings:notify_admins:help'),
15  'name' => 'security_notify_admins',
16  'default' => 0,
17  'value' => 1,
18  'switch' => true,
19  'checked' => (bool) elgg_get_config('security_notify_admins'),
20 ]);
21 
22 // notify user about add/remove admin of his/her account
24  '#type' => 'checkbox',
25  '#label' => elgg_echo('admin:security:settings:notify_user_admin'),
26  '#help' => elgg_echo('admin:security:settings:notify_user_admin:help'),
27  'name' => 'security_notify_user_admin',
28  'default' => 0,
29  'value' => 1,
30  'switch' => true,
31  'checked' => (bool) elgg_get_config('security_notify_user_admin'),
32 ]);
33 
34 // notify user about password change
36  '#type' => 'checkbox',
37  '#label' => elgg_echo('admin:security:settings:notify_user_password'),
38  '#help' => elgg_echo('admin:security:settings:notify_user_password:help'),
39  'name' => 'security_notify_user_password',
40  'default' => 0,
41  'value' => 1,
42  'switch' => true,
43  'checked' => (bool) elgg_get_config('security_notify_user_password'),
44 ]);
45 
46 // notify user about (un)ban of his/her account
48  '#type' => 'checkbox',
49  '#label' => elgg_echo('admin:security:settings:notify_user_ban'),
50  '#help' => elgg_echo('admin:security:settings:notify_user_ban:help'),
51  'name' => 'security_notify_user_ban',
52  'default' => 0,
53  'value' => 1,
54  'switch' => true,
55  'checked' => (bool) elgg_get_config('security_notify_user_ban'),
56 ]);
57 
58 // allow others to extend this section
59 $notifications .= elgg_view('admin/security/settings/extend/notification');
60 
61 echo elgg_view_module('info', elgg_echo('admin:security:settings:label:notifications'), $notifications);
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.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$notifications
Security settings subview - notification related.