I have a few questions related to the User object in SharePoint. When I use AD users, if I Disable a user in AD and run profile synchronization and get the SPUser instance for this user, I have no way of knowing that this user has been Disabled. Only when the user tries to login, we are able to know. I know we can cast SPUser to an NTAccount in this case, but that's not the solution I want.

Also, for FBA with SQL, I don't get the User GUID from the DB into SharePoint. Again, I know I have to cast it as a Membership user to be able to read its properties, but this is not the kind of solution I want. Since I deal with SPUser directly, I should have a way to read some basic properties like whether the user has been disabled or not, UserID etc. in the SPUser object.

Is there a way?

Your Answer

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

Browse other questions tagged or ask your own question.