Merge branch '122-mensaje-de-error-en-gestion-de-usuarios-ext-3871-v7-0' into 'develop'

If result param is null not show bad result message when delete,disable user - #122

See merge request !368
This commit is contained in:
vgilc 2017-08-18 13:18:08 +02:00
commit 453838942e
1 changed files with 12 additions and 11 deletions

View File

@ -127,7 +127,7 @@ else {
$disable_user = get_parameter ("disable_user", false); $disable_user = get_parameter ("disable_user", false);
if (isset ($_GET["user_del"])) { //delete user if (isset ($_GET["user_del"]) && isset ($_GET["delete_user"])) { //delete user
$id_user = get_parameter ("delete_user", 0); $id_user = get_parameter ("delete_user", 0);
// Only allow delete user if is not the actual user // Only allow delete user if is not the actual user
if ($id_user != $config['id_user']) { if ($id_user != $config['id_user']) {
@ -197,16 +197,17 @@ elseif ($disable_user !== false) { //disable_user
else { else {
$result = false; $result = false;
} }
if($result != null){
if ($disable_user == 1) { if ($disable_user == 1) {
ui_print_result_message ($result, ui_print_result_message ($result,
__('Successfully disabled'), __('Successfully disabled'),
__('There was a problem disabling user')); __('There was a problem disabling user'));
} }
else { else {
ui_print_result_message ($result, ui_print_result_message ($result,
__('Successfully enabled'), __('Successfully enabled'),
__('There was a problem enabling user')); __('There was a problem enabling user'));
}
} }
} }