Option MAIN_ACTIVATE_UPDATESESSIONTRIGGER because a trigger were intoduced here where we should not use a trigger (to not hurt developer and users who were using it). A trigger must be used for business event and only business event.
But best practice is to introduce a hook. For example into master.inc.php file (loaded for gui and command line, because the code of the main.inc.php is executed) Hook does not cost in perf because it is a "declared" mecanism. Triggers are dedicated to "CRUD" business events (even if some were introduced not matching this, we should fix this one day). 2015-02-16 8:07 GMT+01:00 Maxime Kohlhaas <max...@atm-consulting.fr>: > Hi Marcos, > > I didn't find any easy way to do what you want... You might want to try > with MAIN_ACTIVATE_UPDATESESSIONTRIGGER indeed. > > Regards, > > -- > > > *Maxime KohlhaasConsultant associé**ATM Consulting > <http://www.atm-consulting.fr>* > *+33 6 33 42 92 43 <%2B33%206%2033%2042%2092%2043>* > > *NOUVELLE ADRESSE* > *ATM Consulting* > Technosite Valence-Agglo > 26 rue Barthélémy de Laffemas > 26000 Valence > > 2015-02-11 11:59 GMT+01:00 Marcos García <marcos...@gmail.com>: > >> Hi, >> >> Which is the best way to execute something from a module in every page >> right after $conf variables are set? I see that there is some trigger and >> hook after the login but nothing is fired if the session does already exist. >> >> Also I thought about topMenu hooks but they are not executed if they are >> hidden. So... which is the best way? I also found some Multicompany module >> code so I was thinking there is no way unless you can modify the code... >> >> Maybe by enabling MAIN_ACTIVATE_UPDATESESSIONTRIGGER constant so >> that USER_UPDATE_SESSION trigger is fired in every page? >> >> Regards, >> >> >> *Marcos García* >> >> marcos...@gmail.com >> >> >> _______________________________________________ >> Dolibarr-dev mailing list >> Dolibarr-dev@nongnu.org >> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev >> >> > > _______________________________________________ > Dolibarr-dev mailing list > Dolibarr-dev@nongnu.org > https://lists.nongnu.org/mailman/listinfo/dolibarr-dev > >
_______________________________________________ Dolibarr-dev mailing list Dolibarr-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/dolibarr-dev