Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[-] CORE : fixed bug #PSCFV-8035 - 'auth' hook exception is not working

  • Loading branch information...
commit 06c1b3537b419731f454fe6c678a3835a39dbb2e 1 parent ba62406
@vAugagneur vAugagneur authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 classes/Hook.php
View
12 classes/Hook.php
@@ -393,7 +393,17 @@ public static function exec($hook_name, $hook_args = array(), $id_module = null,
if ($check_exceptions)
{
$exceptions = $moduleInstance->getExceptions($array['id_hook']);
- if (in_array(Dispatcher::getInstance()->getController(), $exceptions))
+ $controller = Dispatcher::getInstance()->getController();
+
+ if (in_array($controller, $exceptions))
+ continue;
+
+ //retro compat of controller names
+ $matching_name = array(
+ 'authentication' => 'auth',
+ 'compare' => 'products-comparison',
+ );
+ if (isset($matching_name[$controller]) && in_array($matching_name[$controller], $exceptions))
continue;
if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))
continue;
Please sign in to comment.
Something went wrong with that request. Please try again.