-
56
-
546
-
30/11/2010
-
United States
How do I impersonate a user?
-
16639
-
156220
-
22/10/2008
-
Armenia
Go to a customer details page (admin area), then 'Place order' tab and click 'Place order' button.
-
11
-
55
-
14/11/2016
-
United States
Hello,
I have a view that I show my customers to 12 PM on A friday. I have that piece of code in their and all works well.
What I would like to know is, is there a way I can impersonate the client and nop picks up that I am actually the admin and allows me to see the view.
So basically:
IF it is after 12 pm = Dont let the customer see
IF it is after 12 pm and the customer is being impersonated by the admin, still let them see
Is that possible? Is there a function/service I can query to check this :)
-
11399
-
101637
-
22/05/2011
-
United States
var isImpersonating = _workContext.OriginalCustomerIfImpersonated != null;
If using above in a View (.cshtml file), you will need to resolve the _workContext.