From b8fde12def39ddd53e73e09adb8096fb43bb604d Mon Sep 17 00:00:00 2001 From: abb Date: Fri, 12 Feb 2021 17:18:07 +0100 Subject: [PATCH] Fix : To use restrictedArea Hook, we need to call initHooks before restrictedArea --- htdocs/adherents/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index d2755c9acd8..b33eb3564bf 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -81,6 +81,9 @@ if (!empty($canvas)) { $objcanvas->getCanvas('adherent', 'membercard', $canvas); } +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('membercard', 'globalcard')); + // Security check $result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', 0); @@ -107,9 +110,6 @@ if ($id) { $caneditfieldmember = $user->rights->adherent->creer; } -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('membercard', 'globalcard')); - /*