Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Register] Password Confirm validation issue #125

Open
jonleverrier opened this issue Mar 1, 2018 · 0 comments
Open

[Register] Password Confirm validation issue #125

jonleverrier opened this issue Mar 1, 2018 · 0 comments

Comments

@jonleverrier
Copy link

Using MODX 2.6.1 / Login 1.9.5

Issue

If the register snippet is posted blank by mistake, the password_confirm field loads directly a lexicon value (register.password_not_confirmed), which is not assigned to an error message tpl (for example, vTextPasswordConfirm), so cannot be overridden in the snippet call and customised like the rest of the error messages.

If you want to customise the output of these error messages on the snippet call, this won't be possible.

loginvalidator.class.php - line 372

if (empty($value)) return $this->modx->lexicon('register.password_not_confirmed');

^ Code in question...this loads a lexicon if the password_confirm and password fields are empty (which seems inconsistent with how the rest of the code handles errors below).

Expected behaviour

To be able to customise this particular error message in the register snippet call and for it to not load directly a lexicon value.

if (empty($value)) {
    return $this->_getErrorMessage($key,'vTextPasswordConfirm','register.password_dont_match',array(
        'field' => $key,
        'password' => $value,
        'password_confirm' => $confirm,
    ));
}

^ I appreciate this makes the lexicon value (register.password_not_confirmed) redundant, but actually from a UX perspective, it makes sense to join "register.password_dont_match".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant