Skip to content

User write stages do not trigger a Model Updated event when writing to an existing user #4878

@rhaex

Description

@rhaex

Describe the bug
User write stages do not trigger a "Model updated" event when the user is existing if the stage is after an email stage with "activate pending user on success".

To Reproduce
Steps to reproduce the behavior:

  1. Create a new enrollment flow
  2. Add a prompt stage to enter username email and name
  3. Do a user write, make sure it always creates a new user and store the user as inactive
  4. Add an email stage, and enable "Activate pending user on success"
  5. Add a prompt stage to set the password
  6. Do another user write, make sure it never creates a user
  7. Do a log in

During this process there is no Model Updated event sent in the second user write.
However, when you remove the email stage, it will trigger this event.
It also triggers the correct event in the user-write on a user settings flow for example, so it seems to be related to the activation stage.

Expected behavior
A user write should trigger a Model Updated event when modifying an existing user, as it also triggers a Model Created event when a new user is written to.

Version and Deployment (please complete the following information):

  • authentik version: 2023.1.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbug/confirmedConfirmed bugs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions