diff --git a/pandora_console/godmode/massive/massive_delete_profiles.php b/pandora_console/godmode/massive/massive_delete_profiles.php index 96ee68ded8..15f3489567 100644 --- a/pandora_console/godmode/massive/massive_delete_profiles.php +++ b/pandora_console/godmode/massive/massive_delete_profiles.php @@ -57,12 +57,19 @@ if ($delete_profiles) { foreach($profiles_id as $profile) { foreach($groups_id as $group) { foreach($users_id as $id_up) { - $user = (string) db_get_value_filter ('id_usuario', 'tusuario_perfil', array('id_up' => $id_up)); + if ($id_up == 0){ + echo '

'.__('Not deleted. You must select an existing user').'

'; + $result=""; + } + else{ + $user = (string) db_get_value_filter ('id_usuario', 'tusuario_perfil', array('id_up' => $id_up)); - db_pandora_audit("User management", - "Deleted profile for user ".io_safe_input($user)); + db_pandora_audit("User management", + "Deleted profile for user ".io_safe_input($user)); - $result = profile_delete_user_profile ($user, $id_up); + $result = profile_delete_user_profile ($user, $id_up); + } + } } } diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 9151925dc6..ee42407c9d 100644 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -163,7 +163,9 @@ if ($update_agents) { db_pandora_audit("Masive management", "Update agent " . $id_agent, false, false, json_encode($fields)); } else { - db_pandora_audit("Masive management", "Try to update agent " . $id_agent, false, false, json_encode($fields)); + if (isset ($id_agent)) { + db_pandora_audit("Masive management", "Try to update agent " . $id_agent, false, false, json_encode($fields)); + } }