Iterating profiles

E

etam

Hi,

is there any solution to iterate through all user profiles?

Thanks in advance,
Etam.
 
G

Guest

Use ProfileInfo.UserName in conjunction with
ProfileManager.FindProfilesByUserName() to get the full profile object.
 
E

etam

Use ProfileInfo.UserName in conjunction with
ProfileManager.FindProfilesByUserName() to get the full profile object.

Is this a good solution:

ProfileInfoCollection pic =
ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All);
foreach(ProfileInfo pi in pic) {
ProfileCommon p =
(ProfileCommon)ProfileCommon.Create(pi.UserName);
System.Diagnostics.Debug.WriteLine(p.Name.Caption);
}

?
 
E

etam

Use ProfileInfo.UserName in conjunction with
ProfileManager.FindProfilesByUserName() to get the full profile object.

ProfileManager.FindProfilesByUserName() also gives
ProfileInfosCollection.
 
G

Guest

Apologies for the copy/paste mistake. I meant using Profile.GetProfile()
along with ProfileInfo.UserName. You might also want to use
ProfileManager.GetAllProfiles() for any filtering.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,174
Messages
2,570,940
Members
47,484
Latest member
JackRichard

Latest Threads

Top