Hi,
Yes, this is possible. Here's the code from a UserSignInHandler EventHandler that I created a while back that does this exact thing. Relevant code in bold.
public class RedirectToUserPageOnLogin : UserSignInHandlerProvider
{
private static readonly ILog log = LogManager.GetLogger(typeof(CreateUserPage));
private SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();
private SiteUser siteUser = null;
public RedirectToUserPageOnLogin()
{ }
public override void UserSignInEventHandler(object sender, UserSignInEventArgs e)
{
if (e == null) return;
if (e.SiteUser == null) return;
siteUser = e.SiteUser;
if (siteUser.WebSiteUrl != string.Empty)
{
//SiteUtils.RedirectToUrl(siteUser.WebSiteUrl);
HttpContext.Current.Response.Redirect(SiteUtils.GetNavigationSiteRoot() + siteUser.WebSiteUrl, true);
}
}
}
I stored the redirect URL in the WebSiteUrl property of the SiteUser object. I did that only because it was an easy place to store and retrieve it.
Hope this helps,
Joe D.