Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: POC of Dolibarr redirect url feature #64

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions class/actions_easyurl.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
3 changes: 2 additions & 1 deletion core/modules/modEasyURL.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down