If u == null, your entire if statement will be passed through . Outside the if statement, there is no return statement.
That's why you see: not all code paths return a value .
Just add a return statement after the if block:
public bool isUserProfileHashed(string username) { bool isHashed = false; MembershipUser u = null; u = Membership.GetUser(username); if (u != null) {
source share