I’m trying to use &postHooks for [[!Login]] snippet, but found a weird behavior.
The logged in user is available when logging out, not when logging in.
The documentation has this line: “However, note that getUser() will not necessarily return the active user object!”
The login extra uses the stardard Modx processors security/login and security/logout, so this is probably standard behaviour. Maybe the changes of the login/logout process only take effect on the next request.
I ended up by capturing the request, with assumption that the login attempt is succeeded since the postHooks’s function is called when the login processor returns true.
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.