diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 95859efa7..0c706184e 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -44,29 +44,33 @@ class SettingsController extends Controller $user = Auth::user(); $profile = $user->profile; + $validate = config('pixelfed.enforce_email_verification'); if($user->email != $email) { $changes = true; $user->email = $email; - $user->email_verified_at = null; - // Prevent old verifications from working - EmailVerification::whereUserId($user->id)->delete(); + + if($validate) { + $user->email_verified_at = null; + // Prevent old verifications from working + EmailVerification::whereUserId($user->id)->delete(); + } } // Only allow email to be updated if not yet verified - if(!$changes && $user->email_verified_at) { + if(!$validate || !$changes && $user->email_verified_at) { if($profile->name != $name) { $changes = true; $user->name = $name; $profile->name = $name; } - if($profile->website != $website) { + if(!$profile->website || $profile->website != $website) { $changes = true; $profile->website = $website; } - if($profile->bio != $bio) { + if(!$profile->bio || !$profile->bio != $bio) { $changes = true; $profile->bio = $bio; } diff --git a/resources/views/profile/partial/user-info.blade.php b/resources/views/profile/partial/user-info.blade.php index 14575f18a..8e801d522 100644 --- a/resources/views/profile/partial/user-info.blade.php +++ b/resources/views/profile/partial/user-info.blade.php @@ -70,13 +70,14 @@ -
+
{{$user->name}} @if($user->remote_url) REMOTE PROFILE @endif - {{$user->bio}}
+{{$user->bio}}
+