forgejo_backup/models/fixtures/TestActivateUserEmail
Gusted 0ecd9d9682 fix: user activation with uppercase email address (#8367)
- Right before the call to user email activation, the user is updated [^1]. This causes the email to be lowered, which in turn makes the call to activate the user activation fail (on database where collation is case sensitive, which is the recommend collation by Forgejo).
- The code in `BeforeUpdate` is quite confusing, the comment has become slightly out of date and was reworded to reflect reality and its purpose. The code is also slightly reworked to only lower the email for the `AvatarEmail` field to avoid causing side-effect.
- Added unit test.
- Resolves forgejo/forgejo#8354

[^1]: 4927d4ee3d/routers/web/auth/auth.go (L785)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8367
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-07-02 13:04:22 +02:00
..
email_address.yml fix: user activation with uppercase email address (#8367) 2025-07-02 13:04:22 +02:00
user.yml fix: user activation with uppercase email address (#8367) 2025-07-02 13:04:22 +02:00