validate user in session (#32)

This commit is contained in:
Christoph Haas
2021-07-30 13:56:21 +02:00
parent fbc0b26631
commit 57b57931b2
2 changed files with 15 additions and 0 deletions

View File

@@ -192,3 +192,10 @@ func (s *Server) setFormInSession(c *gin.Context, formData interface{}) (Session
return currentSession, nil
}
func (s *Server) isUserStillValid(email string) bool {
if s.users.GetUser(email) == nil {
return false
}
return true
}