Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Membership.GetUser(object ProviderUserKey) always null

$
0
0

I have this code and for some reason, 'user' is always null. I've even tried to use GetUser(string Username). Same problem. The function is in an external class

public static bool LockStatus(Guid id)
        {
            ///returns true if the account is locked out and false otherwise
            //get user with id
            MembershipUser user = Membership.GetUser(id);

           
            //return users lock status
            return user.IsLockedOut;
        }


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>