Exemple #1
0
func (c App) Login(user *models.User) revel.Result {
	user.Validate(c.Validation)

	// Handle errors
	if c.Validation.HasErrors() {
		c.Validation.Keep()
		c.FlashParams()
		return c.Redirect(App.Index)
	}
	// Ok, display the created user
	return c.Redirect(App.List)
	// return c.Render(user)
}