Ejemplo n.º 1
0
        public override string GetUserNameByEmail(string email)
        {
            MembershipUser user = MembershipUserUtility.FindUserByPredicate(p =>
                                                                            p.Email == email.Trim());

            if (user != null)
            {
                return(user.UserName);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
 public override System.Web.Security.MembershipUser GetUser(object providerUserKey, bool userIsOnline)
 {
     return(MembershipUserUtility.FindUserByPredicate(p =>
                                                      ((userIsOnline == true && p.FindCurrentSession() != null) || userIsOnline == false) &&
                                                      p.Id == Convert.ToInt32(providerUserKey)));
 }
Ejemplo n.º 3
0
 public override System.Web.Security.MembershipUser GetUser(string username, bool userIsOnline)
 {
     return(MembershipUserUtility.FindUserByPredicate(p =>
                                                      ((userIsOnline == true && p.FindCurrentSession() != null) || userIsOnline == false) &&
                                                      p.Username == username.Trim()));
 }