Enable change of login form field type in config.

pull/7179/head
Petr 4 years ago
parent c2e348067e
commit 0fd1d67e82
No known key found for this signature in database
GPG Key ID: F88A856E9CF774B9

@ -476,6 +476,10 @@ $config['login_password_maxlen'] = 1024;
// Example: '/^[a-z0-9_@.-]+$/'
$config['login_username_filter'] = null;
// Input field type.
// Set to 'email' if email address is used as login.
$config['login_field_type'] = 'text';
// Brute-force attacks prevention.
// The value specifies maximum number of failed logon attempts per minute.
$config['login_rate_limit'] = 3;

@ -2136,6 +2136,7 @@ EOF;
{
$default_host = $this->config->get('default_host');
$autocomplete = (int) $this->config->get('login_autocomplete');
$login_field_type = $this->config->get('login_field_type');
$_SESSION['temp'] = true;
@ -2158,7 +2159,7 @@ EOF;
$input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login'));
$input_tzone = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_'));
$input_url = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url));
$input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'required' => 'required')
$input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'required' => 'required', 'type' => $login_field_type)
+ $attrib + $user_attrib);
$input_pass = new html_passwordfield(array('name' => '_pass', 'id' => 'rcmloginpwd', 'required' => 'required')
+ $attrib + $pass_attrib);

Loading…
Cancel
Save