updated-packages
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Laravel\Dusk\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserController
|
||||
{
|
||||
@@ -31,6 +32,7 @@ class UserController
|
||||
*
|
||||
* @param string $userId
|
||||
* @param string $guard
|
||||
* @return void
|
||||
*/
|
||||
public function login($userId, $guard = null)
|
||||
{
|
||||
@@ -38,7 +40,7 @@ class UserController
|
||||
|
||||
$provider = Auth::guard($guard)->getProvider();
|
||||
|
||||
$user = str_contains($userId, '@')
|
||||
$user = Str::contains($userId, '@')
|
||||
? $provider->retrieveByCredentials(['email' => $userId])
|
||||
: $provider->retrieveById($userId);
|
||||
|
||||
@@ -49,6 +51,7 @@ class UserController
|
||||
* Log the user out of the application.
|
||||
*
|
||||
* @param string $guard
|
||||
* @return void
|
||||
*/
|
||||
public function logout($guard = null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user