Detecting "Login as User" session From a plugin, how would I go about detecting if an admin user is using the "Login as User" feature?
I believe the way to do this would be to have your plugin listen for the onBeforeLogin event.

From inside there, you'd check to see if the there is an existing session craft()-&gt;userSession-&gt;isLoggedIn() and the current user is an admin craft()-&gt;userSession-&gt;isAdmin().

If both of those are true, I believe its going to be a pretty safe assumption that an admin just clicked the "Login as User" button.