Edit Password Form
A reusable form for changing account passwords.
Purpose
Edit Password Form provides a reusable account form for changing a user's password. The application maps the form to its user collection and supplies the appropriate password validation policy.
Integration in appnetos-api-dev
The account implementation extends CoreApp\Form\EditPasswordForm. It maps the admin user
collection and obtains the admin password validation regular expression from
Core\Config.
protected function getUserCollection(): BaseUserCollection|null
{
return Registry::get(AdminUserCollection::class);
}
protected function getPassRegex(): string
{
return $this->_config?->getAdminPassRegex() ?? '';
}
The account controller instantiates the form through
Registry::getNew(EditPasswordForm::class)(). Its output is passed to the account
template
as edit_password_view. The template also displays an application-provided password
requirements message.
Security and customization
Use the user collection and password policy belonging to the active application context. Do not implement password persistence in the surrounding Twig template. The exact internal password-handling and AJAX behavior should be verified against the Core App implementation.