diff --git a/class/actions_easyurl.class.php b/class/actions_easyurl.class.php index 1be636c..bc68e3a 100644 --- a/class/actions_easyurl.class.php +++ b/class/actions_easyurl.class.php @@ -197,4 +197,22 @@ public function doActions(array $parameters, $object, string $action): int return 0; // or return 1 to replace standard code } + + /** + * Overloading the beforeLoginAuthentication function : replacing the parent's function with the one below + * + * @param array $parameters Hook metadatas (context, etc...) + * @param CommonObject $object Current object + * @param string $action Current action + * @return int 0 < on error, 0 on success, 1 to replace standard code + */ + public function beforeLoginAuthentication(array $parameters, $object, string $action) { + +// if ($_SERVER['REQUEST_URI']=='/register') { +// header("Location: https://demodoli.digirisk.com/htdocs/custom/digiriskdolibarr/public/ticket/create_ticket.php?idmenu=3912&mainmenu=digiriskdolibarr&leftmenu="); +// exit; +// } + + return 0; // or return 1 to replace standard code + } } diff --git a/core/modules/modEasyURL.class.php b/core/modules/modEasyURL.class.php index 769723f..6c73c47 100644 --- a/core/modules/modEasyURL.class.php +++ b/core/modules/modEasyURL.class.php @@ -121,7 +121,8 @@ public function __construct($db) 'interventioncard', 'propallist', 'orderlist', - 'invoicelist' + 'invoicelist', + 'login' ], // Set this to 1 if features of module are opened to external users 'moduleforexternal' => 0