From d8847fb197a1cb02794d0e0fa6d23cef28a8b846 Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 19 Mar 2020 18:52:24 +0100 Subject: [PATCH] Document in README how to retrieve a list of all registered users --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index a957525..1d66818 100644 --- a/README.md +++ b/README.md @@ -919,6 +919,16 @@ catch (\Delight\Auth\AmbiguousUsernameException $e) { } ``` +#### Retrieving a list of registered users + +When fetching a list of all users, the requirements vary greatly between projects and use cases, and customization is common. For example, you might want to fetch different columns, join related tables, filter by certain criteria, change how results are sorted (in varying direction), and limit the number of results (while providing an offset). + +That’s why it’s easier to use a single custom SQL query. Start with the following: + +```sql +SELECT id, email, username, status, verified, roles_mask, registered, last_login FROM users; +``` + #### Assigning roles to users ```php