Quick alternative:
Se the landing page for everyone to a page with this as the code behind:
using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebControls;
using Framework.Logger;
namespace HomeBridge
{
public partial class Redirect : LayoutsPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
using (new SPMonitoredScope("HomeBridge Redirect Page_Load"))
{
{
try
{
string sHomeURL = null;
HomeBridgeEngine eng = new HomeBridgeEngine(SPContext.Current.Site);
sHomeURL = eng.GetHomeUrl(Context.Request.LogonUserIdentity.Name);
if (!string.IsNullOrEmpty(sHomeURL))
Context.Response.Redirect(sHomeURL, false);
}
catch (Exception ex)
{
Logger.LogError(ex, "HomeBridgeRedirect 3.0");
}
}
}
}
}
}
Then drop this in a class:
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Web;
using System.Web.Caching;
using System.Xml;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.Office.Server;
using Microsoft.Office.Server.Administration;
using Microsoft.Office.Server.UserProfiles;
using Framework.Common;
using Framework.Logger;
namespace HomeBridge
{
public class HomeBridgeEngine
{
private SPSite _site;
/// <summary>
/// Constructor which takes a reference to the site collection.
/// </summary>
/// <param name="site"></param>
public HomeBridgeEngine(SPSite site)
{
_site = site;
}
public string GetHomeUrl(string login)
{
using (new SPMonitoredScope("HomeBridge GetHomeUrl"))
{
UserProfileManager profileManager = null;
string url = null;
url = "http://DefaultUrl.com";
string siteURLProfileDB = null;
_site = SPContext.Current.Site;
SPServiceContext context = SPServiceContext.GetContext(_site);
try
{
profileManager = new UserProfileManager(context);
}
catch (Exception ex)
{
Logger.LogError(ex, "HomeBridgeEngine 3.0");
return url;
}
//Check if user exists in the Profile DB
if (profileManager.UserExists(login))
{
UserProfile user = null;
user = profileManager.GetUserProfile(login);
if (user["URL"].Value != null)
{
siteURLProfileDB = user["URL"].Value.ToString();
return siteURLProfileDB;
}
}
//User Account was not found on Profile DB. Send user to a help page.
else
{
url = "http://Youreallyneedhelp.com";
return url;
}
}
}
}
}
Please not that I have removed a bunch of stuff that was not asked for in this question, so the code will likely work if you tweak it some to meet your needs. However, you will need to check the names as I have annonymized it without verifying that it still works after removing the proprietary bits.