diff --git a/ProcessMaker/Http/Controllers/Api/UserController.php b/ProcessMaker/Http/Controllers/Api/UserController.php index abbf47ab84..558aaac7de 100644 --- a/ProcessMaker/Http/Controllers/Api/UserController.php +++ b/ProcessMaker/Http/Controllers/Api/UserController.php @@ -257,6 +257,8 @@ public function store(Request $request) $user = new User(); $fields = $request->json()->all(); + // Enable this parameter if the parameter is not sent + $fields['email_task_notification'] = $request->input('email_task_notification', true); if (isset($fields['password'])) { $fields['password'] = Hash::make($fields['password']); diff --git a/database/migrations/2025_01_09_210416_add_email_task_notification_to_users_table.php b/database/migrations/2025_01_09_210416_add_email_task_notification_to_users_table.php index 1bb1c67429..6173790e5d 100644 --- a/database/migrations/2025_01_09_210416_add_email_task_notification_to_users_table.php +++ b/database/migrations/2025_01_09_210416_add_email_task_notification_to_users_table.php @@ -13,7 +13,7 @@ public function up() { Schema::table('users', function (Blueprint $table) { - $table->boolean('email_task_notification')->default(1); + $table->boolean('email_task_notification')->default(0); }); }