PDA

View Full Version : onLogin - not firing



zuilin
November 7th, 2020, 05:46
For my main onInit() function I have:



function onInit()
User.onLogin = my_onLogin;
end

Then I have a function called:


my_onLogin(username, activated)
Debug.console("User ", username, " just logged in.");
end

However, this function never fires for any login.

Any ideas why? Did I do something wrong?

zuilin
November 7th, 2020, 06:26
...and now it is. I think an error somewhere else was causing the rest of the script to fail and it wasn't correctly getting to the code in my_onLogin.

(The example above was trivial... my code is obviously longer.)

But this at least seems to work.