User Impersonation |
2/17/2022 1:28:45 PM |
ASPRunner.NET General questions | |
W
wshoap authorDevClub member
i need to create a button, that when clicked, will impersonate any user in my database? Has anyone done this yet? Thank you. |
|
![]() |
Admin 2/17/2022 |
It is possible but we do not have an example. I'm pretty sure that simply logging in as a user is not complicated and you can use loginAs() |
W
|
wshoap authorDevClub member 2/17/2022 |
I want to put this code under a custom button, but it does not appear possible dynamic userName = "User"; I am trying to understand where I can execute this code. Thank you. |
![]() |
Admin 2/17/2022 |
In custom button it will work just fine, in the Server part. Just make sure you use a real username instead of "User". Try this: or this: Reload the page after that to see the change applied. |
W
|
wshoap authorDevClub member 2/18/2022 |
Thank you, I will try this. If I set the second parameter to true, does that reinitialize the app? |
![]() |
Admin 2/18/2022 |
I don't even know what "reinitialize the app". Please refer to the documentation, it explains what exactly this parameter does. |