From ca64d188336753fb94dfb57996bddacaa3c50178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Wed, 4 Feb 2026 17:19:23 +0100 Subject: [PATCH] family assignment logic on user perms of external modules (#36456) * family assignment logic on user perms of external modules Updated family assignment logic to default to 'other' if family does not exist in $familyinfo. * Update copyright year for Charlene Benke --- htdocs/user/perms.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index b8630f53739..c499daed4d9 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -8,6 +8,7 @@ * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2024 MDW * Copyright (C) 2024-2025 Frédéric France + * Copyright (C) 2025-2026 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -503,6 +504,10 @@ if ($result) { $obj->family = 'other'; } + // Si la famille n'existe pas dans $familyinfo, on utilise 'other' + if (!empty($obj->family) && !isset($familyinfo[$obj->family])) { + $obj->family = 'other'; + } if (empty($obj->family_position)) { $obj->family_position = $familyinfo[$obj->family]['position']; if ($obj->module_position < 100000) {