diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 4ccaf4d2f33..95c3c23e52a 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -116,6 +116,9 @@ if (GETPOSTISSET("limityear") && GETPOSTINT("limityear") < 2100) { // Security check $socid = GETPOSTINT('socid'); +if (empty($socid)) { + $socid = $user->socid; // External users: fall back to their own company (consistent with other card pages) +} $id = GETPOSTINT('id'); if ($user->socid && ($socid != $user->socid)) { accessforbidden();