I have cloned the Logon form and modified the Login1_LoggedIn() methos as follows:
// Redirect user to the return url if it is within the Client specific area, or redirect to the Client specific home page
bool busing_return_url = false;
string return_url = ValidationHelper.GetString(Request.QueryString["ReturnURL"], "");
if (return_url != "")
{
// if the Redirect URL is in the Client area, then redirect to there
if (return_url.Contains("/Clients/"))
{
busing_return_url = true;
UrlHelper.Redirect(ResolveUrl(return_url));
}
}
if (!busing_return_url)
{
// check if user's starting alias path has been set
string user_starting_alias_path = CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{%currentuser.userstartingaliaspath%}");
if (user_starting_alias_path != "") /* use the starting alias path */
UrlHelper.Redirect(ResolveUrl("~/Clients/" + user_starting_alias_path + "/Home.aspx"));
else /* default to the News page accessible to all Clients */
UrlHelper.Redirect(ResolveUrl("~/Clients/News.aspx"));
}
The webpart has been changed on the page and I have proved the page is being loaded by adding/changing some static text. However, it appears my code is not being called because the webpart’s Default URL is always being loaded (irrespective of whether this property contains a value).
What am I missing?