public override MembershipUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
        {
            ValidatePasswordEventArgs args = new ValidatePasswordEventArgs(username, password, true);
            OnValidatingPassword(args);

            if (args.Cancel)
            {
                status = MembershipCreateStatus.InvalidPassword;
                return null;
            }

            if (RequiresUniqueEmail && GetUserNameByEmail(email) != "")
            {
                status = MembershipCreateStatus.DuplicateEmail;
                return null;
            }

            MembershipUser u = GetUser(username, false);
            if (u == null)
            {
                DBAuthRepository _user = new DBAuthRepository();
                _user.CreateUser(username, password, email);
                status = MembershipCreateStatus.Success;

                return GetUser(username, false);
            }
            else
            {
                status = MembershipCreateStatus.DuplicateUserName;
            }
            return null;
        }
        // **************************************
        // URL: /Account/Activate/username/key
        // **************************************

        public ActionResult Activate(string username, string key)
        {
            DBAuth.DBAuthRepository _user = new DBAuth.DBAuthRepository();
            if (_user.ActivateUser(username, key) == false)
                return RedirectToAction("Index", "Home");
            else
                return RedirectToAction("LogOn");
        }
 public override string GetUserNameByEmail(string email)
 {
     DBAuthRepository _user = new DBAuthRepository();
     return _user.GetUserNameByEmail(email);
 }
 public override bool ValidateUser(string username, string password)
 {
     DBAuthRepository _user = new DBAuthRepository();
     return _user.ValidateUser(username, password);
 }
 public override MembershipUser GetUser(string username, bool userIsOnline)
 {
     DBAuthRepository _user = new DBAuthRepository();
     return _user.GetUser(username);
 }