In my project we use SLK. In this, I need to find user name in memberships.learners object.
For this, I loop through memberships.learners and find the required the user
I had given the code below
foreach (SlkUser slkUser in memberships.Learners)
// UserID contains the user name
Int32 lsPosition1 = (slkUser.Name.ToUpper().IndexOf(UserID.ToUpper(), 0));
if (lsPosition1 > 0)
//Get the Userkey
userKey = slkUser.UserId.GetKey();
Since there are more than 1000 users, this process takes too long. Is there a better way to get the slkuser info from membership.learners??