public Dictionary <string, string> GetUserRoles(string roleId) { int role; if (Int32.TryParse(roleId, out role)) { return(MarketingLogic.GetUserRoles(role)); } return(MarketingLogic.GetUserRoles()); }
private UserType BuildUserData(string aplId, MyProfileInformation profile, AgentDetails agentData, bool isImpersonatingUser) { var settingsParam = isImpersonatingUser ? ImpersonatingSettings : Settings; return(new UserType() { ID = BuildIdData(aplId), Properties = BuildUserPropertiesData(profile.Firstname, profile.Lastname, profile.Email, aplId, MarketingLogic.SHA1Hash(aplId)), Settings = BuildSettingsData(settingsParam), UserGroups = BuildUserGroups(profile, isImpersonatingUser), Addresses = BuildAddressesData(aplId, profile), Impersonation = BuildImpersonationData(profile, isImpersonatingUser) }); }
private UserType BuildUserData(string aplId, AgentDetails agentData) { return(new UserType() { ID = BuildIdData(aplId), Properties = BuildUserPropertiesData(agentData.FirstName, agentData.LastName, agentData.Email, agentData.APLId, MarketingLogic.SHA1Hash(aplId)), Settings = BuildSettingsData(Settings), UserGroups = BuildUserGroups(agentData), Addresses = BuildAddressesData(agentData) }); }