-
-
Notifications
You must be signed in to change notification settings - Fork 354
Person Impersonation
Person Impersonation provides a way to for a user to be identified through a unique URL parameter. This means that URLs can be generated that link to a Rock instance and contain an identifier that will identify the user without them having to create an account or login.
The Person object now has a read-only property called "ImpersonationParameter." This will return a parameter name and value string that can be added to a generated URL (the parameter name is always "rckipid").
Whenever a Rock page is requested and the rckipid url parameter is included, Rock will evaluate the parameter and set the CurrentUser
to a dynamic user record associated with the person that the value belongs to.
The User object has a "IsAuthenticated
" property that will be false if the current user was set by the rckipid parameter. It will be true if the user actually logged in.
It is important to evaluate the IsAuthenticated
property of the CurrentUser
if an action requires that the user has actually logged in. For example, the LoginStatus.ascx
control will only display the "My Account" link if the current user is authenticated.