Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hellomars's avatar

Kiosk - impersonating a user - how to check?

Dear sparkers,

I would like to have some customized blade pages that show more info when the admin is looking at the pages via the impersonating option in Kiosk. Is that possible? Is there a method that can check if the admin is impersonating the user instead of the actual user being logged in?

0 likes
1 reply
hellomars's avatar
hellomars
OP
Best Answer
Level 1

And I found it! I looked through the Spark code for impersonating and went from there.

If you check like this:

''' if(Session::has('spark:impersonator')){ // do stuff }'''

It checks if you are in impersonator mode. Can also be used in blade views, very very nice.

1 like

Please or to participate in this conversation.