mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-04 15:17:28 +02:00
Document in README how to retrieve a list of all registered users
This commit is contained in:
10
README.md
10
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
|
||||
|
Reference in New Issue
Block a user