Elgg  Version 4.3
account.php
Go to the documentation of this file.
1 <?php
8 $account = '';
9 
10 // require password the changing email address
12  '#type' => 'checkbox',
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  'default' => 0,
17  'value' => 1,
18  'switch' => true,
19  'checked' => (bool) elgg_get_config('security_email_require_password'),
20 ]);
21 
22 // require confirmation on e-mail change
24  '#type' => 'checkbox',
25  '#label' => elgg_echo('admin:security:settings:email_require_confirmation'),
26  '#help' => elgg_echo('admin:security:settings:email_require_confirmation:help'),
27  'name' => 'security_email_require_confirmation',
28  'default' => 0,
29  'value' => 1,
30  'switch' => true,
31  'checked' => (bool) elgg_get_config('security_email_require_confirmation'),
32 ]);
33 
34 // minimal username length
36  '#type' => 'number',
37  '#label' => elgg_echo('admin:security:settings:minusername'),
38  '#help' => elgg_echo('admin:security:settings:minusername:help'),
39  'name' => 'minusername',
40  'min' => 1,
41  'value' => (int) elgg_get_config('minusername'),
42  'required' => true,
43 ]);
44 
45 // minimal password length
47  '#type' => 'number',
48  '#label' => elgg_echo('admin:security:settings:min_password_length'),
49  '#help' => elgg_echo('admin:security:settings:min_password_length:help'),
50  'name' => 'min_password_length',
51  'min' => 1,
52  'value' => (int) elgg_get_config('min_password_length'),
53  'required' => true,
54 ]);
55 
56 // minimal password num chars - lower case
58  '#type' => 'number',
59  '#label' => elgg_echo('admin:security:settings:min_password_lower'),
60  '#help' => elgg_echo('admin:security:settings:min_password_lower:help'),
61  'name' => 'min_password_lower',
62  'min' => 0,
63  'value' => elgg_get_config('min_password_lower'),
64 ]);
65 
66 // minimal password num chars - upper case
68  '#type' => 'number',
69  '#label' => elgg_echo('admin:security:settings:min_password_upper'),
70  '#help' => elgg_echo('admin:security:settings:min_password_upper:help'),
71  'name' => 'min_password_upper',
72  'min' => 0,
73  'value' => elgg_get_config('min_password_upper'),
74 ]);
75 
76 // minimal password num chars - lower case
78  '#type' => 'number',
79  '#label' => elgg_echo('admin:security:settings:min_password_number'),
80  '#help' => elgg_echo('admin:security:settings:min_password_number:help'),
81  'name' => 'min_password_number',
82  'min' => 0,
83  'value' => elgg_get_config('min_password_number'),
84 ]);
85 
86 // minimal password num chars - lower case
88  '#type' => 'number',
89  '#label' => elgg_echo('admin:security:settings:min_password_special'),
90  '#help' => elgg_echo('admin:security:settings:min_password_special:help'),
91  'name' => 'min_password_special',
92  'min' => 0,
93  'value' => elgg_get_config('min_password_special'),
94 ]);
95 
96 // allow others to extend this section
97 $account .= elgg_view('admin/security/settings/extend/account');
98 
99 echo elgg_view_module('info', elgg_echo('admin:security:settings:label:account'), $account);
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1143
$account
Security settings subview - user account related.
Definition: account.php:8
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
elgg echo
Translates a string.
Definition: deprecated.js:530
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
elgg_get_config($name, $default=null)
Get an Elgg configuration value.