diff --git a/app/Http/Controllers/Settings/HomeSettings.php b/app/Http/Controllers/Settings/HomeSettings.php index 5279aa5ea..2cee249d0 100644 --- a/app/Http/Controllers/Settings/HomeSettings.php +++ b/app/Http/Controllers/Settings/HomeSettings.php @@ -55,7 +55,7 @@ trait HomeSettings $layout = !in_array($layout, ['metro', 'moment']) ? 'metro' : $layout; } - $enforceEmailVerification = config('pixelfed.enforce_email_verification'); + $enforceEmailVerification = config_cache('pixelfed.enforce_email_verification'); // Only allow email to be updated if not yet verified if (!$enforceEmailVerification || !$changes && $user->email_verified_at) { @@ -152,7 +152,7 @@ trait HomeSettings $user = Auth::user(); $profile = $user->profile; - $validate = config('pixelfed.enforce_email_verification'); + $validate = config_cache('pixelfed.enforce_email_verification'); if ($user->email != $email) { $changes = true; @@ -193,4 +193,4 @@ trait HomeSettings return view('settings.avatar'); } -} \ No newline at end of file +} diff --git a/app/Http/Middleware/EmailVerificationCheck.php b/app/Http/Middleware/EmailVerificationCheck.php index 50e3da9c7..fab7a0bfb 100644 --- a/app/Http/Middleware/EmailVerificationCheck.php +++ b/app/Http/Middleware/EmailVerificationCheck.php @@ -6,31 +6,31 @@ use Closure; class EmailVerificationCheck { - /** - * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * - * @return mixed - */ - public function handle($request, Closure $next) - { - if ($request->user() && - config('pixelfed.enforce_email_verification') && - is_null($request->user()->email_verified_at) && - !$request->is( - 'i/auth/*', - 'i/verify-email', - 'log*', - 'i/confirm-email/*', - 'settings/home', - 'settings/email' - ) - ) { - return redirect('/i/verify-email'); - } + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * + * @return mixed + */ + public function handle($request, Closure $next) + { + if ($request->user() && + config_cache('pixelfed.enforce_email_verification') && + is_null($request->user()->email_verified_at) && + !$request->is( + 'i/auth/*', + 'i/verify-email', + 'log*', + 'i/confirm-email/*', + 'settings/home', + 'settings/email' + ) + ) { + return redirect('/i/verify-email'); + } - return $next($request); - } + return $next($request); + } } diff --git a/resources/views/site/help/getting-started.blade.php b/resources/views/site/help/getting-started.blade.php index 452b4537a..6d8f88db8 100644 --- a/resources/views/site/help/getting-started.blade.php +++ b/resources/views/site/help/getting-started.blade.php @@ -20,14 +20,14 @@
  • Go to {{config('app.url')}}.
  • Click on the register link at the top of the page.
  • Enter your name, email address, username and password.
  • - @if(config('pixelfed.enforce_email_verification') != true) + @if(config_cache('pixelfed.enforce_email_verification') != true)
  • Wait for an account verification email, it may take a few minutes.
  • @endif

    -

    +

    - Pixelfed is a federated application, changing your username is not supported in every federated software so we cannot allow username changes. Your best option is to create a new account with your desired username. + Pixelfed is a federated application, changing your username is not supported in every federated software so we cannot allow username changes. Your best option is to create a new account with your desired username.

    -

    +