Skip to content

PhoenixKit 2.25.0: See who added a user, and a fixed Create User form

PhoenixKit 2.25.0 records which admin added a user and fixes two problems with creating users from the admin.

Who added a user

The admin user details page shows Added By for users that an admin created by hand. An empty value means the user signed up on their own, through the registration form, a magic link, a social sign-in or a guest checkout, or was added before this release and left no trace.

Users added earlier are filled in from the activity log entries the admin form has always written, as far back as the log’s retention kept them. Only an admin account that still exists is copied in. Deleting the admin who added someone does not delete or block deleting the people they added; the value is simply cleared.

The value is set only when an admin creates the user and is never taken from a submitted form, so a public sign-up cannot claim to have been added by an admin.

Create User fixes

If something failed after the user was saved, usually the confirmation email, the page crashed and the admin was left on a refilled form. Submitting it again then said the email was already taken. A failed email now shows “User created, but the confirmation email could not be sent.” instead of claiming it was sent, and a successful create opens the new user’s page instead of the users list.

Admins creating users also went through the public sign-up rate limit, so an admin adding more than ten users an hour was refused and used up the sign-up allowance of their own network address. Admin-created users no longer count against it.

Upgrading

Run mix phoenix_kit.update for migration V191. It adds a created_by_uuid column to the users table, with an index and a foreign key, and fills it from the activity log. Rolling it back loses the column’s values.

Full release notes: PhoenixKit 2.25.0

2.25.0 · 16 September 2026

Added

  • Who added a user — phoenix_kit_users.created_by_uuid (migration V191: self-referencing foreign key, ON DELETE SET NULL, indexed), shown as “Added By” on the admin user details page. Backfilled from the user.created activity entries the admin form has always logged, as far back as activity retention kept them. Set only by the new Auth.admin_create_user/2; never cast from params, so a public sign-up cannot claim an admin added it.

Fixed

  • Admin “Create User” left the admin on a refilled form. Anything that raised after the insert (the confirmation mailer is the unguarded step) crashed the LiveView; form recovery refilled every field, and a second submit reported the email as taken. The email send is now rescued (a failed send shows a warning flash instead of claiming it was sent), and a successful create navigates to the new user’s page instead of the users list.
  • Admin user creation no longer counts against the registration rate limits. The admin form went through the anonymous sign-up limiter, so an admin adding more than ten users an hour was refused — and used up the public sign-up budget of their own IP.

PhoenixKit 2.25.0. Install or update: {:phoenix_kit, "~> 2.25"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.