chuck
chuck

Reputation: 141

SPGroupCollection not recognizing new Users groups

I am trying to search sharepoint groups of a particular User, but the below code is not recognizing recently added users. It says he is not in groups even if he is in groups

SPGroupCollection collGroupsUser = oUser.OwnedGroups; // (group count as zero)

Upvotes: 1

Views: 322

Answers (1)

Sylvain Reverdy
Sylvain Reverdy

Reputation: 2608

the property OwnedGroups, as it is named, countains Groups the user owns. If you want to know in what groups he belongs, use the property Groups

Upvotes: 1

Related Questions