fixes #2071 sorts users by date and username

This commit is contained in:
Willy "Linty 2023-12-18 18:05:09 +01:00
parent a5be190ef2
commit fbae0b735c
4 changed files with 80 additions and 8 deletions

View file

@ -34,6 +34,15 @@ function ws_users_getList($params, &$service)
return new PwgError(WS_ERR_INVALID_PARAM, 'Invalid input parameter order');
}
// Insensitive case sort order
if (isset($params['order']))
{
if (strpos($params['order'], "username") !== false)
{
$params['order'] = str_ireplace("username", "LOWER(username)", $params['order']);
}
}
$where_clauses = array('1=1');
if (!empty($params['user_id']))