The fallback block only runs when EmailFallback || UsernameFallback, so when UsernameFallback is off the else branch (previously an empty-username candidate) is the email-only lookup path: it must still run one GetUserWithEmail to link an existing local user by email. Removing it entirely would skip that lookup and create a duplicate user for the emailfallback-only config. Replace the empty-string sentinel with an explicit []*user.User candidate list built in a small helper, keeping the same behavior, and assert no duplicate is created in the email-only fallback test. |
||
|---|---|---|
| .. | ||
| auth | ||
| avatar | ||
| background | ||
| dump | ||
| humaecho5 | ||
| keyvalue | ||
| migration | ||