Event Listener Hijacking Password Reset

It turns out the problem is due to calling the code via $mydoc.getRenderedContent(). If I paste the code in directly it doesn’t cause any errors.

It might be worth noting that def docSource = xcontext.method.input.get(1) causes a null object error on the Content Manager.Code.On Event Objects page, but this has never affected the event listener behaviour. As I understand it, this is only due to the page trying to render itself.

I’ll mark this as resolved but if anyone has any suggestions on the correct way to “include” my code in this way that would be very welcome.

Thanks again.