A free open source IT asset/license management system
Added the log item
snipe2067b1138af7
diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.phpindex 6d32e8b6f2..cacfe7662b 100644--- a/app/Http/Controllers/Api/UsersController.php+++ b/app/Http/Controllers/Api/UsersController.php@@ -663,6 +663,16 @@ class UsersController extends Controller$user->two_factor_enrolled = 0;$user->save();+ // Log the reset+ $logaction = new Actionlog();+ $logaction->target_type = User::class;+ $logaction->target_id = $user->id;+ $logaction->item_type = User::class;+ $logaction->item_id = $user->id;+ $logaction->created_at = date('Y-m-d H:i:s');+ $logaction->user_id = Auth::user()->id;+ $logaction->logaction('2FA reset');+return response()->json(['message' => trans('admin/settings/general.two_factor_reset_success')], 200);} catch (\Exception $e) {return response()->json(['message' => trans('admin/settings/general.two_factor_reset_error')], 500);