Skip to content

Custom user edit screen support#14789

Merged
brandonkelly merged 2 commits into5.1from
feature/custom-user-edit-screens
Apr 11, 2024
Merged

Custom user edit screen support#14789
brandonkelly merged 2 commits into5.1from
feature/custom-user-edit-screens

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

Description

Makes it possible for plugins to register custom user edit screens.

To do that, they must use craft\controllers\UsersController::EVENT_DEFINE_EDIT_SCREENS and add additional screen definitions to $event->screens.

Then, they must define a route to handle the screen URI, and point it to a controller class which uses craft\controllers\EditUserTrait.

The controller action should then fetch the edited user (ideally using $this->editedUser(), and then fetch the prepared response object via $this->asEditUserScreen(), modify its contents, and return it.

[ci skip]
@brandonkelly brandonkelly merged commit 3fe844a into 5.1 Apr 11, 2024
@brandonkelly brandonkelly deleted the feature/custom-user-edit-screens branch April 11, 2024 17:55
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

Successfully merging this pull request may close these issues.

1 participant