Skip to content

Commit

Permalink
User() now returns a userinterface instead of a pointer to userinterface
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide bonomini committed Dec 5, 2023
1 parent 60955e2 commit 50b69e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evo.user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package evo

import "github.com/getevo/evo/v2/lib/generic"

func (r *Request) User() *UserInterface {
func (r *Request) User() UserInterface {
if r.user == nil {
var user = (UserInterfaceInstance).FromRequest(r)
r.user = &user
}
return r.user
return *r.user
}

type DefaultUserInterface struct{}
Expand Down

0 comments on commit 50b69e7

Please sign in to comment.