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:
commit
453838942e
|
@ -127,7 +127,7 @@ else {
|
|||
|
||||
$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);
|
||||
// Only allow delete user if is not the actual user
|
||||
if ($id_user != $config['id_user']) {
|
||||
|
@ -197,16 +197,17 @@ elseif ($disable_user !== false) { //disable_user
|
|||
else {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if ($disable_user == 1) {
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully disabled'),
|
||||
__('There was a problem disabling user'));
|
||||
}
|
||||
else {
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully enabled'),
|
||||
__('There was a problem enabling user'));
|
||||
if($result != null){
|
||||
if ($disable_user == 1) {
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully disabled'),
|
||||
__('There was a problem disabling user'));
|
||||
}
|
||||
else {
|
||||
ui_print_result_message ($result,
|
||||
__('Successfully enabled'),
|
||||
__('There was a problem enabling user'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue