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

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
econsor_ag
Posts: 31
Joined: 18 Jun 2019, 08:35

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

Post 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.
cas
Posts: 935
Joined: 11 Mar 2006, 16:08
Contact:

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

Post 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.
econsor_ag
Posts: 31
Joined: 18 Jun 2019, 08:35

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

Post 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!
atrol
Site Admin
Posts: 7864
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post 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
Please use Search before posting and read the Manual
Post Reply