Skip to content

Commit

Permalink
Merge pull request #9 from CachetHQ/2.4
Browse files Browse the repository at this point in the history
Update from upstream repo CachetHQ/Cachet
  • Loading branch information
billmn authored Oct 7, 2016
2 parents de41c0d + 2913193 commit 1faf5d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
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
Expand All @@ -48,7 +47,7 @@ public function postLogin()
$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.
Expand Down

0 comments on commit 1faf5d1

Please sign in to comment.