Merge pull request #16277 from bafbes/abb120356

Fix : To use restrictedArea Hook, we need to call initHooks before restrictedArea
This commit is contained in:
Laurent Destailleur 2021-02-14 21:51:53 +01:00 committed by GitHub
commit 342978005a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'));
/*