mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
license upgrade function
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
namespace App\Socialite\Controllers;
|
||||
|
||||
use App\Users\Models\User;
|
||||
@@ -8,15 +7,16 @@ use App\Http\Controllers\Controller;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
use App\Users\Actions\CreateNewUserAction;
|
||||
use Illuminate\Contracts\Auth\StatefulGuard;
|
||||
use VueFileManager\Subscription\Domain\Plans\Exceptions\MeteredBillingPlanDoesntExist;
|
||||
use VueFileManager\Subscription\Domain\Plans\Models\Plan;
|
||||
use VueFileManager\Subscription\Domain\Plans\Exceptions\MeteredBillingPlanDoesntExist;
|
||||
|
||||
class SocialiteCallbackController extends Controller
|
||||
{
|
||||
public function __construct(
|
||||
protected StatefulGuard $guard,
|
||||
protected StatefulGuard $guard,
|
||||
public CreateNewUserAction $createNewUser,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws MeteredBillingPlanDoesntExist
|
||||
@@ -60,7 +60,7 @@ class SocialiteCallbackController extends Controller
|
||||
}
|
||||
|
||||
// Check if account registration is enabled
|
||||
if (!$isAllowedRegistration) {
|
||||
if (! $isAllowedRegistration) {
|
||||
return response([
|
||||
'type' => 'error',
|
||||
'message' => 'User registration is not allowed',
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Users\Actions;
|
||||
|
||||
use App\Users\Rules\PasswordValidationRules;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\Users\Rules\PasswordValidationRules;
|
||||
use Laravel\Fortify\Contracts\UpdatesUserPasswords;
|
||||
|
||||
class UpdateUserPassword implements UpdatesUserPasswords
|
||||
@@ -25,7 +24,7 @@ class UpdateUserPassword implements UpdatesUserPasswords
|
||||
'current_password' => ['required', 'string'],
|
||||
'password' => $this->passwordRules(),
|
||||
])->after(function ($validator) use ($user, $input) {
|
||||
if (!isset($input['current_password']) || !Hash::check($input['current_password'], $user->password)) {
|
||||
if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) {
|
||||
$validator->errors()->add('current_password', __t('password_doesnt_match'));
|
||||
}
|
||||
})->validateWithBag('updatePassword');
|
||||
|
||||
Reference in New Issue
Block a user