mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-29 11:15:58 +00:00
Fix backend code styling
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use App\Models\Setting;
|
||||
use App\Models\UserSettings;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Validation\Rule;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Contracts\Auth\StatefulGuard;
|
||||
@@ -19,7 +18,8 @@ class CreateNewUserAction extends Controller
|
||||
|
||||
public function __construct(
|
||||
protected StatefulGuard $guard
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and create a newly registered user.
|
||||
@@ -27,12 +27,12 @@ class CreateNewUserAction extends Controller
|
||||
public function __invoke(Request $request): Response
|
||||
{
|
||||
$settings = Setting::whereIn('name', [
|
||||
'storage_default', 'registration'
|
||||
'storage_default', 'registration',
|
||||
])
|
||||
->pluck('value', 'name');
|
||||
|
||||
// Check if account registration is enabled
|
||||
if (!intval($settings['registration'])) {
|
||||
if (! intval($settings['registration'])) {
|
||||
abort(401);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class CreateNewUserAction extends Controller
|
||||
'storage_capacity' => $settings['storage_default'],
|
||||
]);
|
||||
|
||||
if (!get_setting('user_verification')) {
|
||||
if (! get_setting('user_verification')) {
|
||||
$user->markEmailAsVerified();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ class CreateNewUserAction extends Controller
|
||||
|
||||
event(new Registered($user));
|
||||
|
||||
if (!get_setting('user_verification')) {
|
||||
if (! get_setting('user_verification')) {
|
||||
$this->guard->login($user);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class UpdateUserPassword implements UpdatesUserPasswords
|
||||
{
|
||||
Validator::make($input, [
|
||||
'current_password' => ['required', 'string'],
|
||||
'password' => $this->passwordRules(),
|
||||
'password' => $this->passwordRules(),
|
||||
])->after(function ($validator) use ($user, $input) {
|
||||
if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) {
|
||||
$validator->errors()->add('current_password', __('The provided password does not match your current password.'));
|
||||
|
||||
@@ -34,7 +34,7 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
$this->updateVerifiedUser($user, $input);
|
||||
} else {
|
||||
$user->forceFill([
|
||||
'name' => $input['name'],
|
||||
'name' => $input['name'],
|
||||
'email' => $input['email'],
|
||||
])->save();
|
||||
}
|
||||
@@ -50,8 +50,8 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
protected function updateVerifiedUser($user, array $input)
|
||||
{
|
||||
$user->forceFill([
|
||||
'name' => $input['name'],
|
||||
'email' => $input['email'],
|
||||
'name' => $input['name'],
|
||||
'email' => $input['email'],
|
||||
'email_verified_at' => null,
|
||||
])->save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user