#11161 Fix conditional to evaluate user_admin. Fix style CSS. Fix process_user_log
This commit is contained in:
parent
e870f45e5c
commit
c3d8aa39bd
|
@ -715,11 +715,12 @@ if ($update_user) {
|
||||||
$password_new = (string) get_parameter('password_new', '');
|
$password_new = (string) get_parameter('password_new', '');
|
||||||
$password_confirm = (string) get_parameter('password_confirm', '');
|
$password_confirm = (string) get_parameter('password_confirm', '');
|
||||||
$own_password_confirm = (string) get_parameter('own_password_confirm', '');
|
$own_password_confirm = (string) get_parameter('own_password_confirm', '');
|
||||||
|
$id_user = (string) get_parameter('id_user', '');
|
||||||
|
|
||||||
if ($password_new != '') {
|
if ($password_new != '') {
|
||||||
$correct_password = false;
|
$correct_password = false;
|
||||||
|
|
||||||
$user_credentials_check = process_user_login($config['id_user'], $own_password_confirm, true);
|
$user_credentials_check = process_user_login($id_user, $own_password_confirm, true);
|
||||||
|
|
||||||
if ($user_credentials_check !== false) {
|
if ($user_credentials_check !== false) {
|
||||||
$correct_password = true;
|
$correct_password = true;
|
||||||
|
|
|
@ -302,9 +302,11 @@ $passwordManageTable->data['fields_repeatpassword'][0] = html_print_input_text_e
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($new_user === false) {
|
if ($new_user === false && users_is_admin() === false) {
|
||||||
$passwordManageTable->data['captions_currentpassword'][0] = __('Current password');
|
$passwordManageTable->data['captions_currentpassword'][0] = __('Current password');
|
||||||
$passwordManageTable->rowclass['fields_currentpassword'] = 'w540px';
|
$passwordManageTable->rowclass['fields_currentpassword'] = 'w540px';
|
||||||
|
|
||||||
|
if ($user_info['id_user'] === $config['id_user']) {
|
||||||
$passwordManageTable->data['fields_currentpassword'][0] = html_print_input_text_extended(
|
$passwordManageTable->data['fields_currentpassword'][0] = html_print_input_text_extended(
|
||||||
'own_password_confirm',
|
'own_password_confirm',
|
||||||
'',
|
'',
|
||||||
|
@ -321,6 +323,24 @@ if ($new_user === false) {
|
||||||
true,
|
true,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$passwordManageTable->data['fields_currentpassword'][0] = html_print_input_text_extended(
|
||||||
|
'own_password_confirm',
|
||||||
|
'',
|
||||||
|
'own_password_confirm',
|
||||||
|
'',
|
||||||
|
'20',
|
||||||
|
'45',
|
||||||
|
$view_mode,
|
||||||
|
'',
|
||||||
|
[
|
||||||
|
'class' => 'input w100p',
|
||||||
|
'placeholder' => __('Third user password confirmation'),
|
||||||
|
],
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$userManagementTable->data['passwordManage_table'] = html_print_table($passwordManageTable, true);
|
$userManagementTable->data['passwordManage_table'] = html_print_table($passwordManageTable, true);
|
||||||
|
|
|
@ -11597,8 +11597,8 @@ p.trademark-copyright {
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-hide-pass {
|
.show-hide-pass {
|
||||||
position: absolute;
|
position: relative;
|
||||||
right: 12px;
|
right: 40px;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
border: 0;
|
border: 0;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
Loading…
Reference in New Issue