Commit para revisar progreso

Former-commit-id: e1e07ad590624f958e0e8cc31b18d6f936df485e
This commit is contained in:
marcos.alconada 2019-03-26 11:03:36 +01:00
parent e163c27b43
commit ce49a45d2a
1 changed files with 15 additions and 4 deletions

View File

@ -14732,15 +14732,26 @@ function api_get_filter_user_group($user, $group, $disable)
}
if ($group !== null) {
$sql = "select * from tperfil,tusuario_perfil where tperfil.id_perfil in (select tusuario_perfil.id_perfil from tusuario_perfil where id_usuario = '$user' and id_grupo = $group) LIMIT 1";
$filter_user = db_get_all_rows_sql($sql);
$condition = $grupo;
$campo = 'group';
}
if ($disable !== null) {
$sql = "select * from tperfil,tusuario_perfil where tperfil.id_perfil in (select tusuario_perfil.id_perfil from tusuario_perfil where id_usuario = '$user' and disable = $disable) LIMIT 1";
$filter_user = db_get_all_rows_sql($sql);
$condition = $disable;
$campo = 'disable';
}
// CASO CON USUARIO DE META CONSOLE
/*
if ($user_meta !== null) {
$campo = 'metaconsole_assigned_server';
$condition = 1;
}
*/
$sql = sprintf(('select * from tperfil,tusuario_perfil where tperfil.id_perfil in (select tusuario_perfil.id_perfil from tusuario_perfil where id_usuario = '$user' and %s = % d)'), $campo, $condition);
$filter_user = db_get_all_rows_sql($sql);
if ($filter_user === false) {
returnError('Error_user', ' User profile could not be found.');
} else {