Page 1 of 1

Is there a plugin event to redirect to custom page after login?

Posted: 23 Jul 2020, 13:19
by econsor_ag
Hello,

is there a plugin event, or some other method to redirect to custom page after login?
I want to create a "stamp-in" system for employees where they have to confirm a button after login that they started working for that day.

Re: Is there a plugin event to redirect to custom page after login?

Posted: 23 Jul 2020, 13:41
by cas
Perhaps you can use this setting:
/**
* Default page after Login or Set Project
* @global string $g_default_home_page
*/
$g_default_home_page = 'my_view_page.php';

If that does not work, you always can define your own plugin Event and adjust source code ( not the best solution but sometimes unavoidable).
In that case be aware change need to implemented again with each update of Mantis itself.

Re: Is there a plugin event to redirect to custom page after login?

Posted: 23 Jul 2020, 14:00
by econsor_ag
cas wrote:
23 Jul 2020, 13:41
Perhaps you can use this setting:
/**
* Default page after Login or Set Project
* @global string $g_default_home_page
*/
$g_default_home_page = 'my_view_page.php';

If that does not work, you always can define your own plugin Event and adjust source code ( not the best solution but sometimes unavoidable).
In that case be aware change need to implemented again with each update of Mantis itself.
Thank you for the quick reply,

I will try out using $g_default_home_page but your other advice is what I was trying to avoid :lol:

Thank you!

Re: Is there a plugin event to redirect to custom page after login?

Posted: 25 Jul 2020, 08:54
by atrol
The whole authentication process can be influenced by plugins, e.g. check this sample plugin and the various flags what can be done with it.
https://github.com/mantisbt-plugins/Sam ... tion-flags