mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Update config() to config_cache()
This commit is contained in:
parent
7873b7ecc5
commit
f4fc8347c9
3 changed files with 37 additions and 37 deletions
|
@ -55,7 +55,7 @@ trait HomeSettings
|
||||||
$layout = !in_array($layout, ['metro', 'moment']) ? 'metro' : $layout;
|
$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
|
// Only allow email to be updated if not yet verified
|
||||||
if (!$enforceEmailVerification || !$changes && $user->email_verified_at) {
|
if (!$enforceEmailVerification || !$changes && $user->email_verified_at) {
|
||||||
|
@ -152,7 +152,7 @@ trait HomeSettings
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$profile = $user->profile;
|
$profile = $user->profile;
|
||||||
|
|
||||||
$validate = config('pixelfed.enforce_email_verification');
|
$validate = config_cache('pixelfed.enforce_email_verification');
|
||||||
|
|
||||||
if ($user->email != $email) {
|
if ($user->email != $email) {
|
||||||
$changes = true;
|
$changes = true;
|
||||||
|
|
|
@ -17,7 +17,7 @@ class EmailVerificationCheck
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if ($request->user() &&
|
if ($request->user() &&
|
||||||
config('pixelfed.enforce_email_verification') &&
|
config_cache('pixelfed.enforce_email_verification') &&
|
||||||
is_null($request->user()->email_verified_at) &&
|
is_null($request->user()->email_verified_at) &&
|
||||||
!$request->is(
|
!$request->is(
|
||||||
'i/auth/*',
|
'i/auth/*',
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<li>Go to <a href="{{config('app.url')}}">{{config('app.url')}}</a>.</li>
|
<li>Go to <a href="{{config('app.url')}}">{{config('app.url')}}</a>.</li>
|
||||||
<li>Click on the register link at the top of the page.</li>
|
<li>Click on the register link at the top of the page.</li>
|
||||||
<li>Enter your name, email address, username and password.</li>
|
<li>Enter your name, email address, username and password.</li>
|
||||||
@if(config('pixelfed.enforce_email_verification') != true)
|
@if(config_cache('pixelfed.enforce_email_verification') != true)
|
||||||
<li>Wait for an account verification email, it may take a few minutes.</li>
|
<li>Wait for an account verification email, it may take a few minutes.</li>
|
||||||
@endif
|
@endif
|
||||||
</ol>
|
</ol>
|
||||||
|
|
Loading…
Reference in a new issue