I took advice from both of you and created a global event handler to intercept the action of a user being updated. I captured the office id that the user was associated with, then got the document with that ID. I then set the users starting alias path value equal to that of the office node alias path.
/// <summary>
/// Every time a user in the role "officer" is updated, updated the user "starting alias path" value to node alias path of the office they are associated with
/// </summary>
/// <param name="sender"></param>
/// <param name="user"></param>
private void UserGroup_UpdateUserStartingAliasPathHandler(object sender, ObjectEventArgs user)
{
// Gets the user
UserInfo currentUser = UserInfoProvider.GetUserInfo((int)user.Object.GetValue("UserID"));
//user is a privilege level of admin or higher
var userIsAdminPrivilegeOrHigher = currentUser.CheckPrivilegeLevel(CMS.Base.UserPrivilegeLevelEnum.Admin, SiteContext.CurrentSiteName);
bool checkGlobalRoles = true;
bool checkMembership = true;
bool userIsOfficer = currentUser.IsInRole("SecurityOfficer", SiteContext.CurrentSiteName, checkGlobalRoles, checkMembership);
if (userIsOfficer && userIsAdminPrivilegeOrHigher == false)
{
try
{
//Get Officer credit union node alias path
//NOTE: officehelper is a helper class to get documents from treenode based on where conditions used kentico api.
var nodeAliasPath = officeHelper.GetSingleOfficeNodeAliasPath((int)currentUser.GetValue("OfficeID"));
//Assign the user node alias path value
user.Object.SetValue("UserStartingAliasPath", nodeAliasPath);
}
catch (Exception ex)
{
EventLogProvider.LogEvent(EventType.ERROR, "Global Event Handler: User enabled email", "GEVUserOfficeAliasPath", "Unabled to set user alias path value to document alias path - Error Message: " + ex);
return;
}
}
}