summaryrefslogtreecommitdiff
path: root/includes/controller/users_controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/controller/users_controller.php')
-rw-r--r--includes/controller/users_controller.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php
index da8a9339..403b3f96 100644
--- a/includes/controller/users_controller.php
+++ b/includes/controller/users_controller.php
@@ -284,10 +284,7 @@ function users_list_controller()
}
/** @var User[] $users */
- $users = User::query()
- ->leftJoin('users_contact', 'users.id', '=', 'users_contact.user_id')
- ->leftJoin('users_personal_data', 'users.id', '=', 'users_personal_data.user_id')
- ->leftJoin('users_state', 'users.id', '=', 'users_state.user_id')
+ $users = User::with(['contact', 'personalData', 'state'])
->orderBy($order_by)
->orderBy('name')
->get();