diff --git a/app/Http/Controllers/PreferenceController.php b/app/Http/Controllers/PreferenceController.php index 11aa318a..be9875bc 100644 --- a/app/Http/Controllers/PreferenceController.php +++ b/app/Http/Controllers/PreferenceController.php @@ -42,7 +42,7 @@ public function update(Request $request) $user->unsubscribe_token = Str::random(60); } else { $user->unsubscribe_token = null; - } + $user->unsubscribe_token = $user->is_subscriber ? Str::random(60) : null; $user->save(); }