Reset failed login counter and unlock user when changing password
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit Authentication') ?></h2>
|
||||
</div>
|
||||
<form method="post" action="<?= $this->url->href('UserViewController', 'authentication', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->hidden('username', $values) ?>
|
||||
|
||||
<?= $this->hook->render('template:user:authentication:form', array('values' => $values, 'errors' => $errors, 'user' => $user)) ?>
|
||||
|
||||
<?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?>
|
||||
<?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
|
||||
<?= t('or') ?>
|
||||
<?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
<ul>
|
||||
<li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li>
|
||||
<li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,35 +0,0 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Edit user') ?></h2>
|
||||
</div>
|
||||
<form method="post" action="<?= $this->url->href('UserViewController', 'edit', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Username'), 'username') ?>
|
||||
<?= $this->form->text('username', $values, $errors, array('required', isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?>
|
||||
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Email'), 'email') ?>
|
||||
<?= $this->form->email('email', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Timezone'), 'timezone') ?>
|
||||
<?= $this->form->select('timezone', $timezones, $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Language'), 'language') ?>
|
||||
<?= $this->form->select('language', $languages, $values, $errors) ?>
|
||||
|
||||
<?php if ($this->user->isAdmin()): ?>
|
||||
<?= $this->form->label(t('Role'), 'role') ?>
|
||||
<?= $this->form->select('role', $roles, $values, $errors) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
|
||||
<?= t('or') ?>
|
||||
<?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,26 +0,0 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Password modification') ?></h2>
|
||||
</div>
|
||||
|
||||
<form method="post" action="<?= $this->url->href('UserViewController', 'password', array('user_id' => $user['id'])) ?>" autocomplete="off">
|
||||
|
||||
<?= $this->form->hidden('id', $values) ?>
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<div class="alert alert-error">
|
||||
<?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?>
|
||||
<?= $this->form->password('current_password', $values, $errors) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->form->label(t('New password for the user "%s"', $this->user->getFullname($user)), 'password') ?>
|
||||
<?= $this->form->password('password', $values, $errors) ?>
|
||||
|
||||
<?= $this->form->label(t('Confirmation'), 'confirmation') ?>
|
||||
<?= $this->form->password('confirmation', $values, $errors) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
|
||||
<?= t('or') ?>
|
||||
<?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -15,6 +15,10 @@
|
||||
<li><?= t('Role:') ?> <strong><?= $this->user->getRoleName($user['role']) ?></strong></li>
|
||||
<li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li>
|
||||
<li><?= $user['twofactor_activated'] == 1 ? t('Two factor authentication enabled') : t('Two factor authentication disabled') ?></li>
|
||||
<li><?= t('Number of failed login:') ?> <strong><?= $user['nb_failed_login'] ?></strong></li>
|
||||
<?php if ($user['lock_expiration_date'] != 0): ?>
|
||||
<li><?= t('Account locked until:') ?> <strong><?= $this->dt->datetime($user['lock_expiration_date']) ?></strong></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<div class="page-header">
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
<ul>
|
||||
<?php if ($this->user->isAdmin() || $this->user->isCurrentUser($user['id'])): ?>
|
||||
|
||||
<?php if ($this->user->hasAccess('UserViewController', 'edit')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserViewController', 'edit') ?>>
|
||||
<?= $this->url->link(t('Edit profile'), 'UserViewController', 'edit', array('user_id' => $user['id'])) ?>
|
||||
<?php if ($this->user->hasAccess('UserModificationController', 'show')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserModificationController', 'show') ?>>
|
||||
<?= $this->url->link(t('Edit profile'), 'UserModificationController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('AvatarFile') ?>>
|
||||
<?= $this->url->link(t('Avatar'), 'AvatarFile', 'show', array('user_id' => $user['id'])) ?>
|
||||
@@ -43,8 +43,8 @@
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['is_ldap_user'] == 0): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserViewController', 'password') ?>>
|
||||
<?= $this->url->link(t('Change password'), 'UserViewController', 'password', array('user_id' => $user['id'])) ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserCredentialController', 'changePassword') ?>>
|
||||
<?= $this->url->link(t('Change password'), 'UserCredentialController', 'changePassword', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->user->hasAccess('UserViewController', 'authentication')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserViewController', 'authentication') ?>>
|
||||
<?= $this->url->link(t('Edit Authentication'), 'UserViewController', 'authentication', array('user_id' => $user['id'])) ?>
|
||||
<?php if ($this->user->hasAccess('UserCredentialController', 'changeAuthentication')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserCredentialController', 'changeAuthentication') ?>>
|
||||
<?= $this->url->link(t('Edit Authentication'), 'UserCredentialController', 'changeAuthentication', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user