示例#1
0
文件: auth.go 项目: hobo-c/gin_sample
// UpdateUser updates the User object stored in the session. This is useful incase a change
// is made to the user model that needs to persist across requests.
func UpdateUser(s sessions.Session, user User) error {
	s.Set(SessionKey, user.UniqueId())
	s.Save()
	return nil
}