Impersonate Example
In this example, the first line of text is executed using the current identity which is the Guest User when the browser is not logged in. The Impersonate macro then changes the current user to the user 'rene' which may have more or less rights than the original user. Finally, the last statement is executed as the original user.
Smartsite SXML | Copy Code |
---|---|
Here my name is {user.fullname()} <se:impersonate username="visitor1" password="Visitor1"> Now I'm impersonated as the user {user.fullname()} </se:impersonate> And now my name is {user.fullname()} |
Example Result | Copy Code |
---|---|
Here my name is Guest Now I'm impersonated as the user Site Visitor And now my name is Guest |