Skip to content

Commit 9fbdaf4

Browse files
authored
Merge pull request #906 from kenjis/docs-improve-customization/login_identifier
docs: add note for removing email from registration in customization/login_identifier
2 parents 7774592 + d6aad43 commit 9fbdaf4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/customization/login_identifier.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Customizing Login Identifier
22

3-
If your application has a need to use something other than `email` or `username`, you may specify any valid column within the `users` table that you may have added. This allows you to easily use phone numbers, employee or school IDs, etc. as the user identifier. You must implement the following steps to set this up:
3+
If your application has a need to use something other than `email` or `username`, you may specify any valid column within the `users` table that you may have added.
4+
5+
This allows you to easily use phone numbers, employee or school IDs, etc. as the user identifier.
6+
You must implement the following steps to set this up.
47

58
This only works with the Session authenticator.
69

10+
!!! note
11+
12+
By default, Shield requires users to register their email and password.
13+
Further customization is required beyond the steps on this page to remove
14+
emails from user registrations.
15+
716
## Create Migration File
817

918
Create a [migration](http://codeigniter.com/user_guide/dbmgmt/migration.html) that
@@ -39,6 +48,12 @@ public array $validFields = [
3948
You must write new **Validation Rules** and then set them using the
4049
[Customizing Validation Rules](./validation_rules.md#login) description.
4150

51+
!!! note
52+
53+
Not only the Validation Rules for **login**, but also the rules for
54+
[registration](./validation_rules.md#registration) should be updated. If you do
55+
not add the new **Validation Rules**, the new field will not be saved to the database.
56+
4257
## Customize Login View
4358

4459
1. Change the `login` view file in the **app/Config/Auth.php** file.

0 commit comments

Comments
 (0)