MDL-55476 auth: remove loginpasswordautocomplete

This commit is contained in:
Jade Telford 2017-01-19 05:03:29 +00:00
parent d97582fd27
commit 8380658219
11 changed files with 22 additions and 33 deletions

View file

@ -56,11 +56,6 @@ class block_login extends block_base {
// TODO: now that we have multiauth it is hard to find out if there is a way to change password
$forgot = $wwwroot . '/login/forgot_password.php';
if (!empty($CFG->loginpasswordautocomplete)) {
$autocomplete = 'autocomplete="off"';
} else {
$autocomplete = '';
}
$username = get_moodle_cookie();
@ -75,14 +70,15 @@ class block_login extends block_base {
$strusername = get_string('usernameemail');
}
$this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.get_login_url().'" '.$autocomplete.'>';
$this->content->text .= "\n".'<form class="loginform" id="login" method="post" action="'.get_login_url().'">';
$this->content->text .= '<div class="form-group"><label for="login_username">'.$strusername.'</label>';
$this->content->text .= '<input type="text" name="username" id="login_username" class="form-control" value="'.s($username).'" /></div>';
$this->content->text .= '<div class="form-group"><label for="login_password">'.get_string('password').'</label>';
$this->content->text .= '<input type="password" name="password" id="login_password" class="form-control" value="" '.$autocomplete.' /></div>';
$this->content->text .= '<input type="password" name="password" id="login_password" class="form-control"
value="" /></div>';
if (isset($CFG->rememberusername) and $CFG->rememberusername == 2) {
$checked = $username ? 'checked="checked"' : '';