change role to "user" for new registrations, fixed some registration form errors and implemented a reg-test

This commit is contained in:
Codex Agent
2025-10-02 15:06:50 +02:00
parent 7475210893
commit 1845d83583
13 changed files with 416 additions and 191 deletions

View File

@@ -2,6 +2,8 @@
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use PayPal\PayPalHttp\Client;
@@ -76,6 +78,11 @@ class PayPalWebhookController extends Controller
]
);
$user = User::find($metadata['user_id'] ?? null);
if ($user) {
$user->update(['role' => 'tenant_admin']);
}
// Log purchase
PackagePurchase::create([
'tenant_id' => $tenant->id,