-
- 23 Posts
Hello guys,
I’m using Login in Revo.
I’ve been trying to hook a plugin to the OnWebLogin event to sync a custom user table with modx user data.
The weird part is when I check $modx->getLoginUserId() and $modx->getLoinUserName, the values are the expected,
but when I try accessing the data from $modx->user two things can happen:
1- If I’m logged in the manager I get the managerUser info currently logged in;
2- If I’m not logged (in the manager) I get errors trying to access the values ($modx->user doesn’t get set apparently, haven’t checked yet)
a - What am I doing wrong? / How can I get the currently logging-in user data?
b - Is this the right event to hook this plugin?
c - what are the objects available at this "early" stage?
One suggestion: It would be awesome to have a bit more documentation on the Login snippet events.
Thanks.
Diego