mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Merge branch 'ent-11375-user-bulk-operations-al-intentar-anadir-un-perfil-que-el-usuario-ya-tiene-el-aviso-de-error' into 'develop'
Ent 11375 user bulk operations al intentar anadir un perfil que el usuario ya tiene el aviso de error See merge request artica/pandorafms!6160
This commit is contained in:
commit
640c417a35
@ -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