Skip to content
  • JediKev's avatar
    d9108b11
    issue: Set Staff Password On Creation · d9108b11
    JediKev authored
    This addresses an issue reported on the Forum where setting a password for
    an Agent upon creation doesn't save the password in the backend. This means
    if you set a password, click Create, and then try to login as the agent you
    will be denied access (as there is no password saved). We store the
    PasswordResetForm data in the session for later use but we do not actually
    use the form data anywhere in the `Staff::update()` method. This updates the
    `Staff::update()` method to include a check for the form data and if exists
    sets the password and saves it in the backend. This maintains current
    functionality where if `Send the agent a password reset email` is enabled
    then we do not set the password, instead we send the Agent a registration
    email.
    
    In addition, this updates the `StaffAjaxAPI::setPassword()` to include
    password validation so if a password is not valid we do not save it.
    Instead, we will keep the modal open and throw validation errors until a
    valid password is given. This means the form data will not be stored in the
    session until we have a valid password.
    d9108b11
    issue: Set Staff Password On Creation
    JediKev authored
    This addresses an issue reported on the Forum where setting a password for
    an Agent upon creation doesn't save the password in the backend. This means
    if you set a password, click Create, and then try to login as the agent you
    will be denied access (as there is no password saved). We store the
    PasswordResetForm data in the session for later use but we do not actually
    use the form data anywhere in the `Staff::update()` method. This updates the
    `Staff::update()` method to include a check for the form data and if exists
    sets the password and saves it in the backend. This maintains current
    functionality where if `Send the agent a password reset email` is enabled
    then we do not set the password, instead we send the Agent a registration
    email.
    
    In addition, this updates the `StaffAjaxAPI::setPassword()` to include
    password validation so if a password is not valid we do not save it.
    Instead, we will keep the modal open and throw validation errors until a
    valid password is given. This means the form data will not be stored in the
    session until we have a valid password.
Loading