diff --git a/app/sprinkles/admin/schema/requests/user/create.yaml b/app/sprinkles/admin/schema/requests/user/create.yaml index 821482001..5ad6e155b 100644 --- a/app/sprinkles/admin/schema/requests/user/create.yaml +++ b/app/sprinkles/admin/schema/requests/user/create.yaml @@ -90,7 +90,7 @@ passwordc: message: VALIDATE.REQUIRED matches: domain: client - field: value + field: password label: "&PASSWORD.CONFIRM" message: VALIDATE.PASSWORD_MISMATCH length: diff --git a/app/sprinkles/admin/src/Controller/UserController.php b/app/sprinkles/admin/src/Controller/UserController.php index 74cc83c4c..5d9417b3d 100644 --- a/app/sprinkles/admin/src/Controller/UserController.php +++ b/app/sprinkles/admin/src/Controller/UserController.php @@ -167,7 +167,7 @@ public function create(Request $request, Response $response, $args) $passwordRequest = $this->ci->repoPasswordReset->create($user, $config['password_reset.timeouts.create']); // If the password_mode is manual, do not send an email to set it. Else, send the email. - if (!isset($data['value'])) { + if ($data['password'] === '') { // Create and send welcome email with password set link $message = new TwigMailMessage($this->ci->view, 'mail/password-create.html.twig'); @@ -786,8 +786,8 @@ public function getModalEditPassword(Request $request, Response $response, $args // Load validation rules $schema = new RequestSchema('schema://requests/user/edit-password.yaml'); - $schema->set('value.validators.length.min', $config['site.password.length.min']); - $schema->set('value.validators.length.max', $config['site.password.length.max']); + $schema->set('password.validators.length.min', $config['site.password.length.min']); + $schema->set('password.validators.length.max', $config['site.password.length.max']); $schema->set('passwordc.validators.length.min', $config['site.password.length.min']); $schema->set('passwordc.validators.length.max', $config['site.password.length.max']); $validator = new JqueryValidationAdapter($schema, $this->ci->translator);