public AuthController(ITokenService <int, UserLoginDTO> tokenService, IPasswordService passwordService, IRegisterUser registerCommand, MyComicListContext context) { this.tokenService = tokenService; this.passwordService = passwordService; this.registerCommand = registerCommand; Context = context; }
public static IRegisterUser CreateObject(UserRegistration userRegObj) { IRegisterUser registrationProviderObj = null; switch (userRegObj.RoleRequested.scope) { case Scope.CMS: case Scope.CMSRegional: registrationProviderObj = new CMSRegisterUserBLL(userRegObj); break; case Scope.State: registrationProviderObj = new StateRegisterUserBLL(userRegObj); break; case Scope.SubStateRegion: registrationProviderObj = new SubStateRegisterUserBLL(userRegObj); break; case Scope.Agency: registrationProviderObj = new AgencyRegisterUserBLL(userRegObj); break; default: throw new NotImplementedException("Unknown registration scope requested."); } return(registrationProviderObj); }
public IActionResult Post( [FromBody] UserDto request, [FromServices] IRegisterUser command) { _executor.ExecuteCommand(command, request); return(StatusCode(201)); }
public AccountController(ILogin login, IRegisterUser registerUser , IForgetPassword forgetPassword, IAdminLogin adminLogin) { this.login = login; this.registerUser = registerUser; this.forgetPassword = forgetPassword; this.adminLogin = adminLogin; }
public WebRegisterUser( IRegisterUser registerUser, IWebRegisterUserContext registerUserContext, IWebRegisterUserActions registerUserActions) { RegisterUser = registerUser; RegisterUserContext = registerUserContext; RegisterUserActions = registerUserActions; }
public SendingEmailWithChangingPassword( ICreatingMailMessage icreateMailMessage, ISMTP_Configuration iSmtpConfiguration, IRegisterUser iregUser, IInfoAboutUser infoAboutUser, IEmailDescritpion iEmailDescritpion) { _icreateMailMessage = icreateMailMessage; _iSmtpConfiguration = iSmtpConfiguration; _iregUser = iregUser; _infoAboutUser = infoAboutUser; _ieEmailDescritpion = iEmailDescritpion; }
public void AddUser(IRegisterUser user) { MySqlParameter[] parameters = new MySqlParameter[12]; parameters[0] = new MySqlParameter("@username", user.UserName); parameters[1] = new MySqlParameter("@pass", user.PassWord); parameters[2] = new MySqlParameter("@passwordsalt", user.PassWordSalt); parameters[3] = new MySqlParameter("@email", user.Email); parameters[4] = new MySqlParameter("@firstname", user.FirstName); parameters[5] = new MySqlParameter("@lastname", user.LastName); parameters[6] = new MySqlParameter("@phonenumber", user.PhoneNumber); parameters[7] = new MySqlParameter("@country", user.Country); parameters[8] = new MySqlParameter("@city", user.City); parameters[9] = new MySqlParameter("@streetaddress", user.StreetAddress); parameters[10] = new MySqlParameter("@zipcode", user.ZipCode); parameters[11] = new MySqlParameter("@isadmin", user.IsAdmin); context.ExecuteStoredProcedure("AddUser", parameters); }
protected void dataSourceUserView_Updated(object sender, ObjectContainerDataSourceStatusEventArgs e) { if (UserViewData != null) { if (RegisterUserBLL.DoesUserNameExist(UserViewData.PrimaryEmail)) { DisplayMessage("The Primary Email address is already registered. Duplicates are not allowed.", true); //formView.ChangeMode(FormViewMode.Edit); } else { IRegisterUser regBLL = RegisterUserBLL.CreateRegistrationProviderObject(CreateRegistrationObject()); regBLL.ValidateData(); if (regBLL.IsValid) { if (regBLL.Save()) { AddPresentorStatus = 1; DisplayMessage("The Presenter has been added successfully. You may add another presenter or close this window.", false); UserViewData = new UserViewData(); } else { DisplayMessage("Unable to add presenter. Please contact support if the issue persists. Error: " + regBLL.ErrorMessage, true); } } else { DisplayMessage("Validation error occured while adding new User. Error: " + regBLL.ErrorMessage, true); } } } Page.DataBind(); }
public RegisterUserController(IRegisterUser repository) { _repository = repository; }
protected void RegisterUserCommand(object sender, EventArgs e) { //if(valid) Page.Validate("RegisterForm"); bool FormIsValid = IsFormValid(); //For some reason, CaptchaText EnableViewState=false isn't working. So doing this... CaptchaText.Text = string.Empty; if (!FormIsValid) { DisplayMessage("Please fix the error(s) displayed in red and submit again", true); return; } //sammit-start if (PasswordValidation.DoesTextContainsWord(Password.Text.Trim().ToLower())) { DisplayMessage("The entered password contains a dictionary word and is not allowed.", true); return; } if (PasswordValidation.DoesTextContainsFirstLastName(Password.Text.Trim().ToLower(), FirstName.Text.Trim().ToLower(), LastName.Text.Trim().ToLower(), MiddleName.Text.Trim().ToLower())) { DisplayMessage("The entered password contains either FirstName/MiddleName/LastName and is not allowed.", true); return; } if (PasswordValidation.DoesPassWordContainsEmail(Email.Text.Trim().ToLower(), Password.Text.Trim().ToLower())) { DisplayMessage("The entered password contains your email-id and is not allowed.", true); return; } if (PasswordValidation.DoesContainFourConsecutive(Password.Text.Trim().ToLower())) { DisplayMessage("The entered password contains 4 consecutive letter/number and is not allowed.", true); return; } //sammit-end string UserName = Email.Text.Trim(); if (RegisterUserBLL.DoesUserNameExist(UserName)) { DisplayMessage("The Primary Email address is already registered. Duplicates are not allowed.", true); return; } else { //If Role selected is SHIP Admin, Check if a Ship Director already exists for the Chosen state if (_selectedRole.IsStateAdmin && chBoxIsShipDirector.Checked) { if (LookupBLL.GetShipDirectorForState(ddlStates.SelectedValue.Trim()).HasValue) { DisplayMessage(string.Format("A SHIP Director already exists for state of {0}", State.GetStateName(StateFIPSSelected)), true); return; } } //Fill personal profile info here... RegistrationObject regObj = new RegistrationObject(); regObj.FirstName = FirstName.Text.Trim(); regObj.MiddleName = MiddleName.Text.Trim(); regObj.LastName = LastName.Text.Trim(); regObj.NickName = NickName.Text.Trim(); regObj.Suffix = Suffix.Text.Trim(); regObj.Honorifics = Honorifics.Text.Trim(); regObj.SecondaryEmail = SecondaryEmail.Text.Trim(); regObj.PrimaryPhone = PrimaryPhone.Text.Trim(); regObj.SecondaryPhone = SecondaryPhone.Text.Trim(); //Fill login info and Role regObj.PrimaryEmail = UserName; regObj.ClearPassword = Password.Text.Trim(); //sammit regObj.Password = Password.Text.Trim(); regObj.RoleRequested = _selectedRole; regObj.OldShipUserId = OldShipUserId; regObj.IsRegistrationRequest = true; //GetStateFIPS (including CMS User) regObj.StateFIPS = GetStateFIPSForNewUser(); //Get regional IDs (AgencyID, Sub State Regional ID etc) switch (regObj.RoleRequested.scope) { case Scope.CMSRegional: regObj.UserRegionalAccessProfile.RegionId = int.Parse(ddlCMSRegion.SelectedValue.Trim()); break; case Scope.SubStateRegion: regObj.UserRegionalAccessProfile.RegionId = int.Parse(ddlSubStateRegion.SelectedValue.Trim()); break; case Scope.Agency: regObj.UserRegionalAccessProfile.RegionId = int.Parse(ddlAgency.SelectedValue.Trim()); break; case Scope.State: regObj.IsShipDirector = chBoxIsShipDirector.Checked; break; } //Populate User Descriptors for the Regions other than Agencies PopulateUserDescriptors(ref regObj); //Register IRegisterUser regBLL = RegisterUserBLL.CreateRegistrationProviderObject(regObj); regBLL.ValidateData(); if (regBLL.IsValid) { if (!regBLL.Save()) { DisplayMessage("Unable to complete registration. " + regBLL.ErrorMessage, true); } else { ShowSuccess(); ClearForm(); } } else { DisplayMessage("Error. Validation error occured during registration. " + regBLL.ErrorMessage, true); } } }
protected void AddUserCommand(object sender, EventArgs e) { //if(valid) Page.Validate("RegisterForm"); bool FormIsValid = IsFormValid(); //For some reason, CaptchaText EnableViewState=false isn't working. So doing this... //CaptchaText.Text = string.Empty; if (!FormIsValid) { DisplayMessage("Please fix the error(s) displayed in red and submit again", true); return; } //sammit-start if (PasswordValidation.DoesTextContainsWord(Password.Text.Trim().ToLower())) { DisplayMessage("The entered password contains a dictionary word and is not allowed.", true); return; } if (PasswordValidation.DoesTextContainsFirstLastName(Password.Text.Trim().ToLower(), FirstName.Text.Trim().ToLower(), LastName.Text.Trim().ToLower(), MiddleName.Text.Trim().ToLower())) { DisplayMessage("The entered password contains either FirstName/MiddleName/LastName and is not allowed.", true); return; } if (PasswordValidation.DoesPassWordContainsEmail(Email.Text.Trim().ToLower(), Password.Text.Trim().ToLower())) { DisplayMessage("The entered password contains your email-id and is not allowed.", true); return; } if (PasswordValidation.DoesContainFourConsecutive(Password.Text.Trim().ToLower())) { DisplayMessage("The entered password contains 4 consecutive letter/number and is not allowed.", true); return; } //sammit-end UserName = Email.Text.Trim(); if (RegisterUserBLL.DoesUserNameExist(UserName)) { DisplayMessage("The Primary Email address is already registered. Duplicates are not allowed.", true); return; } else { //if (!UserBLL.CreateUser(CreateRegistrationObject(), false, this.AccountInfo.UserId, out newUserId)) IRegisterUser regBLL = RegisterUserBLL.CreateRegistrationProviderObject(CreateRegistrationObject()); regBLL.ValidateData(); if (regBLL.IsValid) { if (regBLL.Save()) { ShowSuccess(); ClearForm(); } else { DisplayMessage("Unable to add user. Please contact support if the issue persists. Error: " + regBLL.ErrorMessage, true); return; } } else { DisplayMessage("Validation error occured while adding new User. Error: " + regBLL.ErrorMessage, true); } } }
public RegisterUserController() { repository = new RegisterUserConcrete(); }
public LoginController() { _registeruserRepo = new RegisterUserConcrete(); }
public RegistrationController() { _userService = new XConnectProvider(); }
public RegisterController() { registerService = new Register(); }
public AuthServerProvider() { userRegistration = new Register(); }
public RegisterController() { userRegistration = new Register(); }
public LoginController(IRegisterUser IRegisterUser) { _IRegisterUser = IRegisterUser; }
public LoginController() { _IRegisterUser = new RegisterUserConcrete(); }
public UserController() { _userProfileRepo = new UserProfileConcerete(); _registeruserRepo = new RegisterUserConcrete(); }