mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 00:22:15 +00:00
added subscription demo generators
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Users\Actions;
|
||||
|
||||
use App\Users\Models\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Contracts\Auth\StatefulGuard;
|
||||
use VueFileManager\Subscription\Domain\Plans\Models\Plan;
|
||||
|
||||
class CreateNewUserAction extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
protected StatefulGuard $guard,
|
||||
protected StatefulGuard $guard,
|
||||
protected AutoSubscribeForMeteredBillingAction $autoSubscribeForMeteredBilling,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and create a new user.
|
||||
@@ -25,7 +24,7 @@ class CreateNewUserAction extends Controller
|
||||
]);
|
||||
|
||||
// Check if account registration is enabled
|
||||
if (!intval($settings['registration'])) {
|
||||
if (! intval($settings['registration'])) {
|
||||
abort(401);
|
||||
}
|
||||
|
||||
@@ -47,14 +46,14 @@ class CreateNewUserAction extends Controller
|
||||
}
|
||||
|
||||
// Mark as verified if verification is disabled
|
||||
if (!$data->password || !intval($settings['user_verification'])) {
|
||||
if (! $data->password || ! intval($settings['user_verification'])) {
|
||||
$user->markEmailAsVerified();
|
||||
}
|
||||
|
||||
event(new Registered($user));
|
||||
|
||||
// Log in if verification is disabled
|
||||
if (!$data->password || !intval($settings['user_verification'])) {
|
||||
if (! $data->password || ! intval($settings['user_verification'])) {
|
||||
$this->guard->login($user);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user