I need to email a group of Umbraco Members and access custom properties.
//Get the Users ...OK
string[] roles = new string[n]; string[] users = new string[n];
roles = System.Web.Security.Roles.GetAllRoles();
//Get Users in role users = Roles.GetUsersInRole(roles[i]); //iterated here because I could select multiple Roles/Umbraco MemberGroups...
//OK lets get some properties...
Uhhh... this is where I'm in outer-world darkness I cannot convert an Umbraco Member to an System.Web.Security.MembershipUser I can't use theses... -GetMemberFromLoginName(name)... Obsolete, returns empty collection -GetMemberFromEmail(email); Obsolete, returns empty collection
so
how would one iterate through the users array, convert the names into
Umbraco Members, and then access the custom member properties?
Accessing Member Properties
UMB Experts humour me here,
I need to email a group of Umbraco Members and access custom properties.
//Get the Users ...OK
//OK lets get some properties...
Uhhh... this is where I'm in outer-world darkness I cannot convert an Umbraco Member to an System.Web.Security.MembershipUser
I can't use theses...
-GetMemberFromLoginName(name)... Obsolete, returns empty collection
-GetMemberFromEmail(email); Obsolete, returns empty collection
so how would one iterate through the users array, convert the names into Umbraco Members, and then access the custom member properties?
Aaron Powell has a decent write up on getting/setting profile properties here:
http://www.aaron-powell.com/umbraco-members-profiles
If you're just wanting to access an existing profile outside of the current HttpContext, it would be something along the lines of;
EDIT: Sorry, I thought you were talking about profile properties. Maybe this will help:
is working on a reply...