You've already forked php-auth
generated from siteworxpro/Php-Template
Basics of auth
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 54s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Failing after 1m4s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1m14s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m10s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 1m19s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m12s
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 54s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Failing after 1m4s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 1m14s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 1m10s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 1m19s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Failing after 1m12s
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Siteworxpro\App\Cli\Commands\User;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Siteworxpro\App\Cli\Commands\Command;
|
||||
use Siteworxpro\App\Models\ClientUser;
|
||||
use Siteworxpro\App\Models\User;
|
||||
@@ -18,6 +19,7 @@ class Add extends Command
|
||||
{
|
||||
public function __invoke($input, $output): int
|
||||
{
|
||||
/** @var Collection<Client> $clients */
|
||||
$clients = Client::whereJsonContains('grant_types', 'authorization_code')
|
||||
->get(['id', 'name']);
|
||||
|
||||
@@ -51,6 +53,7 @@ class Add extends Command
|
||||
|
||||
$email = $helper->ask($input, $output, $emailQuestion);
|
||||
|
||||
/** @var User| null $user */
|
||||
$user = User::where('email', $email)->first();
|
||||
if ($user) {
|
||||
$output->yellow('A user with this email already exists. Associating the user with the client.');
|
||||
|
||||
Reference in New Issue
Block a user