Use entity update method rather than query. Fixed password reset form action.
This commit is contained in:
parent
acd38c8205
commit
d412e06dad
4 changed files with 7 additions and 8 deletions
|
|
@ -47,11 +47,10 @@ func (c *VerifyEmail) Get(ctx echo.Context) error {
|
|||
|
||||
// Verify the user, if needed
|
||||
if !usr.Verified {
|
||||
err = c.Container.ORM.User.
|
||||
usr, err = usr.
|
||||
Update().
|
||||
SetVerified(true).
|
||||
Where(user.ID(usr.ID)).
|
||||
Exec(ctx.Request().Context())
|
||||
Save(ctx.Request().Context())
|
||||
|
||||
if err != nil {
|
||||
return c.Fail(ctx, err, "failed to set user as verified")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue