Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top