Extracting user details

Vote:
 
Hi, I'm looking to run a bulk mailer to send out newsletters to our subscribed users but I'm unable to see a way of extracting the data from EPi, I know you can extract it manually, but can anyone suggest a way of retrieving the data directly? Many thanks, - Jon
#12619
Mar 25, 2008 18:35
Vote:
 
Hi. If you are referring to personalized properties on users, you should use the API. Loop through the users, and extract each users' personlalized properties using the PersonalizedData class. If you do need to access the data directly from the table in the database, see the table tblUserProperty. For reading properties in this table, I created a User-Defined Function (in SQL) for reading out the properties. Frank :)
#14603
Mar 25, 2008 18:45
Vote:
 
Cracking! Thanks, - Jon
#14604
Mar 25, 2008 18:45
Vote:
 
Frank-Ove to the rescue again! Thanks for your continuing support on the forums, it is really appreciated! Just a side note, regarding direct database access. I understand the need for doing queries against the tblUserProperty table, espesically as the API solution would mean looping over all users instead of a quick select statement. However, if you look at the new membership provider in ASP.NET 2.0, you could be coding yourself into a blind alley. I don't know when, or how, or even if EPiServer will go down that road, but if that happens, make sure you code in a way that isolates database access to a minimum, and also something that could be easily replaced if needed. /Steve
#14605
Mar 25, 2008 18:45
Vote:
 
Hello guys I'm revamping this thread because looping through user collection is exactly what I want to do. Is there API for getting all users, users members of some group and similar? Thanx
#14606
Mar 25, 2008 18:45
Vote:
 
Yes, look at the Sid, UserSid, GroupSid and SidCollection classes in the DataFactory namespace. /Steve
#14607
Mar 25, 2008 18:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.