Skip to content

Commit 3f4f23b

Browse files
committed
docs: update "User Provider" explanations
1 parent e2652ae commit 3f4f23b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

docs/concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on the standard Config class if nothing is found in the database.
2828
Shield has a model to handle user persistence. Shield calls this the "User Provider" class.
2929
A default model is provided for you by the `CodeIgniter\Shield\Models\UserModel` class.
3030

31-
You can use your own model. See [Customizing Shield](./customization.md#custom-user-provider) for details.
31+
You can use your own model to customize user attributes. See [Customizing Shield](./customization.md#custom-user-provider) for details.
3232

3333
## User Identities
3434

docs/customization.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ Similar to the process for validation rules in the **Registration** section, you
185185

186186
## Custom User Provider
187187

188-
You can use your own "[User Provider](./concepts.md#user-providers)" class.
189-
A default model is provided for you by the `CodeIgniter\Shield\Models\UserModel` class. You can change
190-
this in the `Config\Auth::$userProvider` setting. The only requirement is that your new class
191-
MUST extend the provided `UserModel`.
188+
If you want to customize user attributes, you need to create your own
189+
[User Provider](./concepts.md#user-providers) class.
190+
The only requirement is that your new class MUST extend the provided `CodeIgniter\Shield\Models\UserModel`.
192191

193192
Shield has a CLI command to quickly create a custom `UserModel` class by running the following
194193
command in the terminal:
@@ -199,7 +198,7 @@ php spark shield:model UserModel
199198

200199
The class name is optional. If none is provided, the generated class name would be `UserModel`.
201200

202-
You should set `Config\Auth::$userProvider` as follows:
201+
After creating the class, set the `$userProvider` property in **app/Config/Auth.php** as follows:
203202

204203
```php
205204
public string $userProvider = \App\Models\UserModel::class;

0 commit comments

Comments
 (0)