APPNETOS is under active development This website and its documentation are being prepared for public launch. Content and features may change.
Select Theme
Loading

Edit Username Form

A reusable form for changing account usernames.

Purpose

Edit Username Form provides a reusable interface for changing the current user's username. An application-specific extension maps the form to the appropriate user collection.

Integration in appnetos-api-dev

The account implementation extends CoreApp\Form\EditUsernameForm and maps its user collection to Core\Collection\AdminUserCollection.

protected function getUserCollection(): BaseUserCollection|null
{
    return Registry::get(AdminUserCollection::class);
}

The account controller creates a new instance using Registry::getNew(EditUsernameForm::class)() and passes its rendered output to the account template as edit_username_view. The template displays it using {{ edit_username_view|raw }}.

Customization

Map the form to the user collection of the active application context and embed the returned view in the desired page. The shared Core App is responsible for its internal form workflow; consult the Core App source for the complete validation and AJAX method contract.

Next Steps

Previous

Edit Two-Factor Authentication Form

Explore Edit Two-Factor Authentication Form

Next

Core UI

Explore Core UI