4

I have an SPUser object generated from the currently logged in user via SPContext.Current.Web.CurrentUser however user.Groups is coming back empty. I checked the group, the user is in the group. Just to be sure, I've checked the user's permissions via Site Permissions -> Check Permissions through the GUI. The user is in multiple groups. I've checked the user object and it is the user I expect. This is for a FBA user.

What am I missing?

2

This turned out to be really simple. There were two FBA users with the same email so I was logged in as the wrong user and had no idea.

  • I had the same issue, and seems like one user was added with claim-based authentication, while the duplicate user was added by DOMAIN\UserName. great catch! thanks :-) – itsho Jun 26 '16 at 13:23
1

Just out of curiosity, is the user added directly to a site instead of a SP Group? Judging by your post I don't think this is the case, but thought I would ask.

I would do some testing from the other side. Try getting the group in particular that you are sure he is part of and see if he is listed there.

var users = SPGroup.Users;

If the user is not there, I wonder if there is an issue with your user within UPS. Does the user belong in an OU that UPS isn't indexing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.