public bool ValidateUser(string userName, string password) { if (String.IsNullOrEmpty(userName)) { throw new ArgumentException("Value cannot be null or empty.", "userName"); } if (String.IsNullOrEmpty(password)) { throw new ArgumentException("Value cannot be null or empty.", "password"); } return(_provider.ValidateUser(userName, password)); }
private bool ValidateLogOnInformation(MembershipProvider membershipProvider, string userName, string password) { if (String.IsNullOrEmpty(userName)) { ModelState.AddModelError("username", "You must specify a username."); } if (String.IsNullOrEmpty(password)) { ModelState.AddModelError("password", "You must specify a password."); } if (!membershipProvider.ValidateUser(userName, password)) { ModelState.AddModelError("_FORM", "The username or password provided is incorrect."); } return ModelState.IsValid; }
public bool ValidateUser(string applicationName, string username, string password) { _Provider.ApplicationName = _ApplicationName; return(_Provider.ValidateUser(username, password)); }