mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
Merge pull request #9 from CachetHQ/2.4
Update from upstream repo CachetHQ/Cachet
This commit is contained in:
commit
1faf5d1fe1
@ -22,7 +22,6 @@ use Illuminate\Support\Facades\Redirect;
|
||||
use Illuminate\Support\Facades\Request;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\Str;
|
||||
use PragmaRX\Google2FA\Vendor\Laravel\Facade as Google2FA;
|
||||
|
||||
class AuthController extends Controller
|
||||
@ -48,7 +47,7 @@ class AuthController extends Controller
|
||||
$loginData = Binput::only(['username', 'password']);
|
||||
|
||||
// Login with username or email.
|
||||
$loginKey = Str::contains($loginData['username'], '@') ? 'email' : 'username';
|
||||
$loginKey = filter_var($loginData['username'], FILTER_VALIDATE_EMAIL) ? 'email' : 'username';
|
||||
$loginData[$loginKey] = array_pull($loginData, 'username');
|
||||
|
||||
// Validate login credentials.
|
||||
|
Loading…
x
Reference in New Issue
Block a user