Merge branch 'ent-7114-no-se-puede-realizar-llamada-api-add-user-profile-modo-all' into 'develop'

Fixed api add user profile with group all

See merge request artica/pandorafms!3974
This commit is contained in:
Daniel Rodriguez 2021-05-06 12:19:23 +00:00
commit 1e0eabdbf7
1 changed files with 2 additions and 2 deletions

View File

@ -11248,10 +11248,10 @@ function api_set_add_user_profile($id, $thrash1, $other, $thrash2)
return; return;
} }
$group = $other['data'][0]; $group = (int) $other['data'][0];
$profile = $other['data'][1]; $profile = $other['data'][1];
if (db_get_value('id_grupo', 'tgrupo', 'id_grupo', $group) === false) { if ($group !== 0 && db_get_value('id_grupo', 'tgrupo', 'id_grupo', $group) === false) {
returnError('There is not any group with the ID provided.'); returnError('There is not any group with the ID provided.');
return; return;
} }