How to impersonate another users for testing

Nick Kurz:
Is there a video or any documentation on how to use Authlogin to Login as another user so that I can verify that their permissions and data segregation is functioning properly.


Delfs:
No but basically all you need to do is in your app global before hook:
• Check if the users is you via your id
• if its you and you want to jack in as someone else, change the $$BF_User info you the target person you want to emulate
• Some people have even done this in their prefs.


Nick Kurz:
Would that be the Before - Global in the helper file?


Nick Kurz:
So i dont need to run an Authlogin action, just change the $$BF_User data?


Delfs:
You can only emulate / impersonate a user if they are logged in. So yes, they would need to be logged in.
You would use the BEFORE global hook so that the new user is available to your hooks.