From 7ab5d6e927fd1d95b7923522a2d37f6407f76dbf Mon Sep 17 00:00:00 2001 From: Marcy Acevedo Date: Fri, 27 Sep 2024 10:16:41 -0500 Subject: [PATCH] Update app/Http/Controllers/PreferenceController.php Co-authored-by: Andrew Morgan --- app/Http/Controllers/PreferenceController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }