public IUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out AuthenticationCreateStatus status) { status = AuthenticationCreateStatus.ProviderError; return null; }
public MembershipCreateUserException(String message, AuthenticationCreateStatus status = AuthenticationCreateStatus.ProviderError) : base(message) { StatusCode = status; }
private string ErrorCodeToString(AuthenticationCreateStatus createStatus) { // See http://go.microsoft.com/fwlink/?LinkID=177550 for // a full list of status codes. switch (createStatus) { case AuthenticationCreateStatus.DuplicateUserName: return "User name already exists. Please enter a different user name."; case AuthenticationCreateStatus.DuplicateEmail: return "A user name for that e-mail address already exists. Please enter a different e-mail address."; case AuthenticationCreateStatus.InvalidPassword: return "The password provided is invalid. Please enter a valid password value."; case AuthenticationCreateStatus.InvalidEmail: return "The e-mail address provided is invalid. Please check the value and try again."; case AuthenticationCreateStatus.InvalidAnswer: return "The password retrieval answer provided is invalid. Please check the value and try again."; case AuthenticationCreateStatus.InvalidQuestion: return "The password retrieval question provided is invalid. Please check the value and try again."; case AuthenticationCreateStatus.InvalidUserName: return "The user name provided is invalid. Please check the value and try again."; case AuthenticationCreateStatus.ProviderError: return "The authentication provider returned an error. Please verify your entry and try again. If the problem persists, please contact your system administrator."; case AuthenticationCreateStatus.UserRejected: return "The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator."; default: return "An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator."; } }