some not working changes trying to fix user login to include a username

This commit is contained in:
2026-04-08 04:34:16 -04:00
parent 31a8f03ab2
commit 2d5914c970
4 changed files with 66 additions and 83 deletions

View File

@@ -434,6 +434,10 @@ defmodule Mixer.Accounts.User do
identities do
identity :unique_email, [:email]
identity :unique_username, [:username], nils_distinct?: true
identity :unique_username, [:username] do
eager_check_with Mixer.Accounts
message "is already taken"
nils_distinct? true
end
end
end