mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Add ID to the allowed sort fields in api/Users. (#5929)
This commit is contained in:
parent
82194cef8a
commit
3bc43210ab
|
@ -105,7 +105,7 @@ class UsersController extends Controller
|
||||||
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
|
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
|
||||||
'two_factor_enrolled','two_factor_optin','last_login', 'assets_count', 'licenses_count',
|
'two_factor_enrolled','two_factor_optin','last_login', 'assets_count', 'licenses_count',
|
||||||
'consumables_count', 'accessories_count', 'phone', 'address', 'city', 'state',
|
'consumables_count', 'accessories_count', 'phone', 'address', 'city', 'state',
|
||||||
'country', 'zip'
|
'country', 'zip', 'id'
|
||||||
];
|
];
|
||||||
|
|
||||||
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
|
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
|
||||||
|
|
Loading…
Reference in a new issue