public override string GetUserNameByEmail(string email) { MembershipUser user = MembershipUserUtility.FindUserByPredicate(p => p.Email == email.Trim()); if (user != null) { return(user.UserName); } else { return(null); } }
public override System.Web.Security.MembershipUser GetUser(string username, bool userIsOnline) { // TODO: (Optional) if userIsOnline is true, then the user's last action timestamp may be updated. // the current db schema does not support this column. MembershipUser returnValue = MembershipUserUtility.FindUserByPredicate(p => p.Username == username); if (returnValue == null) { using (CSSDataContext db = new CSSDataContext()) { var login = Login.FindLoginByUsernameOrCallsign(db, username); if (login != null) { returnValue = MembershipUserUtility.FindUserByPredicate(p => p.Username == login.Username); } } } return(returnValue); }
public override System.Web.Security.MembershipUser GetUser(object providerUserKey, bool userIsOnline) { // TODO: (Optional) if userIsOnline is true, then the user's last action timestamp may be updated. // the current db schema does not support this column. return(MembershipUserUtility.FindUserByPredicate(p => p.Id == Convert.ToInt32(providerUserKey))); }