liorlankril
Programmer
I have a web part (in c#) that contain TextBox, Button and Datagrid. I want that when the user enter name into the textBox and click on button , it will give him all the users in the DataGrid (can be more then one).
For this I use in me code the UserProfileManager object and I run in a While loop on all user in the user profiles list (and search FirstName or LastName that contain the value i the TextBox) - by a IEnumerator..... But I get an error massage that only manager in the site or user with permmision for change user profile can accses to this UserProfiles IEnumerator!!!!!
How can I do this search that each user will be able to access the UserProfile list.
I use this code:
UserProfileManager objManager = new UserProfileManager(portalContext);
UserProfile userProfile ;
IEnumerator allProfiles= objManager.GetEnumerator();
while (allProfiles.MoveNext())
{
firstName=null;
lastName=null;
userProfile = (UserProfile)allProfiles.Current;
.
.
}
For this I use in me code the UserProfileManager object and I run in a While loop on all user in the user profiles list (and search FirstName or LastName that contain the value i the TextBox) - by a IEnumerator..... But I get an error massage that only manager in the site or user with permmision for change user profile can accses to this UserProfiles IEnumerator!!!!!
How can I do this search that each user will be able to access the UserProfile list.
I use this code:
UserProfileManager objManager = new UserProfileManager(portalContext);
UserProfile userProfile ;
IEnumerator allProfiles= objManager.GetEnumerator();
while (allProfiles.MoveNext())
{
firstName=null;
lastName=null;
userProfile = (UserProfile)allProfiles.Current;
.
.
}