diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index f6d9a4c3b..2afbe1407 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -185,11 +185,20 @@ class UserController extends Controller */ public function json(Request $request) { + $users = QueryBuilder::for(User::query())->allowedFilters(['email'])->paginate(25); + // Handle single user requests. if ($request->query('user_id')) { - return $this->repository->filterById($request->input('user_id')); + $user = User::query()->findOrFail($request->input('user_id')); + $user->md5 = md5(strtolower($user->email)); + + return $user; } - return $this->repository->filterUsersByQuery($request->input('q')); + return $users->map(function ($item) { + $item->md5 = md5(strtolower($item->email)); + + return $item; + }); } } diff --git a/public/themes/pterodactyl/js/admin/new-server.js b/public/themes/pterodactyl/js/admin/new-server.js index 3e0718a46..7416451da 100644 --- a/public/themes/pterodactyl/js/admin/new-server.js +++ b/public/themes/pterodactyl/js/admin/new-server.js @@ -161,7 +161,7 @@ function initUserIdSelect(data) { data: function (params) { return { - q: params.term, // search term + filter: { email: params.term }, page: params.page, }; }, diff --git a/resources/views/admin/nodes/index.blade.php b/resources/views/admin/nodes/index.blade.php index a8de9554d..524d81107 100644 --- a/resources/views/admin/nodes/index.blade.php +++ b/resources/views/admin/nodes/index.blade.php @@ -31,7 +31,7 @@
- +
diff --git a/resources/views/admin/servers/new.blade.php b/resources/views/admin/servers/new.blade.php index fe9c7be24..47f6d06ba 100644 --- a/resources/views/admin/servers/new.blade.php +++ b/resources/views/admin/servers/new.blade.php @@ -327,7 +327,7 @@ // END Persist 'Service Variables' - {!! Theme::js('js/admin/new-server.js') !!} + {!! Theme::js('js/admin/new-server.js?v=20200913') !!}