cartalyst / sentinel

A framework agnostic authentication & authorization system.
BSD 3-Clause "New" or "Revised" License
1.51k stars 238 forks source link

Authenticate using username or email #565

Open mar846 opened 2 years ago

mar846 commented 2 years ago

Your Environment

Expected behaviour

Login with username or email

Actual behaviour

When I use DB::enableQueryLog(), I noticed that it only check for email only, not username as well. I've created custom model that extend Cartalyst\Sentinel\User\EloquentUser and insert this code protected $loginNames = ['email', 'username']; But it's not working. I've tried from [this link](https://github.com/cartalyst/sentinel/issues/554#issuecomment-805941671