Elgg  Version master
account.php
Go to the documentation of this file.
1 <?php
8 $account = '';
9 
10 // require password the changing email address
12  '#type' => 'switch',
13  '#label' => elgg_echo('admin:security:settings:email_require_password'),
14  '#help' => elgg_echo('admin:security:settings:email_require_password:help'),
15  'name' => 'security_email_require_password',
16  'value' => elgg_get_config('security_email_require_password'),
17 ]);
18 
19 // require confirmation on e-mail change
21  '#type' => 'switch',
22  '#label' => elgg_echo('admin:security:settings:email_require_confirmation'),
23  '#help' => elgg_echo('admin:security:settings:email_require_confirmation:help'),
24  'name' => 'security_email_require_confirmation',
25  'value' => elgg_get_config('security_email_require_confirmation'),
26 ]);
27 
28 // minimal username length
30  '#type' => 'number',
31  '#label' => elgg_echo('admin:security:settings:minusername'),
32  '#help' => elgg_echo('admin:security:settings:minusername:help'),
33  'name' => 'minusername',
34  'min' => 1,
35  'value' => (int) elgg_get_config('minusername'),
36  'required' => true,
37 ]);
38 
39 // minimal password length
41  '#type' => 'number',
42  '#label' => elgg_echo('admin:security:settings:min_password_length'),
43  '#help' => elgg_echo('admin:security:settings:min_password_length:help'),
44  'name' => 'min_password_length',
45  'min' => 1,
46  'value' => (int) elgg_get_config('min_password_length'),
47  'required' => true,
48 ]);
49 
50 // minimal password num chars - lower case
52  '#type' => 'number',
53  '#label' => elgg_echo('admin:security:settings:min_password_lower'),
54  '#help' => elgg_echo('admin:security:settings:min_password_lower:help'),
55  'name' => 'min_password_lower',
56  'min' => 0,
57  'value' => elgg_get_config('min_password_lower'),
58 ]);
59 
60 // minimal password num chars - upper case
62  '#type' => 'number',
63  '#label' => elgg_echo('admin:security:settings:min_password_upper'),
64  '#help' => elgg_echo('admin:security:settings:min_password_upper:help'),
65  'name' => 'min_password_upper',
66  'min' => 0,
67  'value' => elgg_get_config('min_password_upper'),
68 ]);
69 
70 // minimal password num chars - lower case
72  '#type' => 'number',
73  '#label' => elgg_echo('admin:security:settings:min_password_number'),
74  '#help' => elgg_echo('admin:security:settings:min_password_number:help'),
75  'name' => 'min_password_number',
76  'min' => 0,
77  'value' => elgg_get_config('min_password_number'),
78 ]);
79 
80 // minimal password num chars - lower case
82  '#type' => 'number',
83  '#label' => elgg_echo('admin:security:settings:min_password_special'),
84  '#help' => elgg_echo('admin:security:settings:min_password_special:help'),
85  'name' => 'min_password_special',
86  'min' => 0,
87  'value' => elgg_get_config('min_password_special'),
88 ]);
89 
90 // allow others to extend this section
91 $account .= elgg_view('admin/security/settings/extend/account');
92 
93 echo elgg_view_module('info', elgg_echo('admin:security:settings:label:account'), $account);
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.
$account
Security settings subview - user account related.
Definition: account.php:8
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