-
Notifications
You must be signed in to change notification settings - Fork 16
How to choose which user fields are used during authentication
Eric Richer edited this page Dec 4, 2020
·
1 revision
How to specify which fields a user can use as their 'identity' when logging in.
The configuration directive auth_identity_fields
is used to control the fields used to look up user identities stored in LmcUser. You can configure this directive (via your config/autoload/lmcuser.global.php
override file) to one of four possible modes:
- Authenticate via email address only:
'auth_identity_fields' => ['email'],
- Authenticate via username only:
'auth_identity_fields' => ['username'],
- Authenticate via both methods, with username field checked first:
'auth_identity_fields' => ['username', 'email'],
- Authenticate via both methods, with email address field checked first:
'auth_identity_fields' => ['email', 'username'],