Run javascript on login

andres

New member
You are using DaDaBIK version 10.0-Manarola enterprise, installed on 04-07-2020 (installation code: 154005e8cf198ef564), the latest version of DaDaBIK is 10.3-Manarola released on 08-26-2020

How can I make Dadabik run a custom javascript after a successful login?

Thank you
Andres
 

eugenio

Administrator
Staff member
Hello,
you have the startup function, but it's a php function ... maybe you can use it to call a url containing the js function? Probably not very secure, though.

The startup function is executed for every page, if you need to do something only after a successful login maybe you could check if $_SESSION['logged_user_infos_ar'] is set ... the var is set after a successful login and it's kept alive during the session.

Best,
 

andres

New member
Thank you Eugenio

I am using this line...

if (isset($_SESSION['logged_user_infos_ar']))

But it is not working. Is there something different I should use instead of logged_user_infos_ar?

Andres
 

eugenio

Administrator
Staff member
What exactly is not working?
The code you posted checks if the current user is logged and I confirm the code is correct.

Best,
 
Top