mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
#11375 bulk add profile error already exists
This commit is contained in:
parent
5020845aea
commit
d2c3982a5d
@ -103,6 +103,7 @@ if ($create_profiles) {
|
|||||||
$groups_id = get_parameter('groups_id', -1);
|
$groups_id = get_parameter('groups_id', -1);
|
||||||
$users_id = get_parameter('users_id', -1);
|
$users_id = get_parameter('users_id', -1);
|
||||||
$n_added = 0;
|
$n_added = 0;
|
||||||
|
$msg_error = __('Profiles cannot be added');
|
||||||
|
|
||||||
if ($profiles_id == -1 || $groups_id == -1 || $users_id == -1) {
|
if ($profiles_id == -1 || $groups_id == -1 || $users_id == -1) {
|
||||||
$result = false;
|
$result = false;
|
||||||
@ -155,6 +156,8 @@ if ($create_profiles) {
|
|||||||
if ($return !== false) {
|
if ($return !== false) {
|
||||||
$n_added++;
|
$n_added++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$msg_error = __('The profile already exist on the user');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,7 +185,7 @@ if ($create_profiles) {
|
|||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
$n_added > 0,
|
$n_added > 0,
|
||||||
__('Profiles added successfully').'('.$n_added.')',
|
__('Profiles added successfully').'('.$n_added.')',
|
||||||
__('Profiles cannot be added')
|
$msg_error
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user