func (c User) Index() revel.Result {
	if c.Session["user"] == "" {
		c.Flash.Error("Not Logged In")
		return c.Redirect(routes.App.Index())
	}
	return c.Render()
}
Show defualt User page
package controllers
import (
	"github.com/JustinJudd/CAGo/app/models"
	"github.com/JustinJudd/CAGo/app/routes"
	"code.google.com/p/go.crypto/bcrypt"
	"github.com/robfig/revel"
)
type User struct {
	App
}
func (c App) getUser(username string) *models.User {
	users, err := c.Txn.Select(models.User{}, `select * from User where Username = ?`, username)
	if err != nil {
		panic(err)
	}
	if len(users) == 0 {
		return nil
	}
	return users[0].(*models.User)
}
func (c App) getUserFromId(userId int) *models.User {
	users, err := c.Txn.Select(models.User{}, `select * from User where Id = ?`, userId)
	if err != nil {
		panic(err)
	}
	if len(users) == 0 {
		return nil
	}
	return users[0].(*models.User)
}
func (c App) connected() *models.User {
	if c.RenderArgs["user"] != nil {
		return c.RenderArgs["user"].(*models.User)
	}
	if username, ok := c.Session["user"]; ok {
		return c.getUser(username)
	}
	return nil
}
func (c App) AddUser() revel.Result {
	if user := c.connected(); user != nil {
		c.RenderArgs["user"] = user
	}
	return nil
}