Esempio n. 1
0
func MemberInfo(c *controller) {
	idStr := c.Get("id", false)
	id, err := model.MustLoad(MODELDRIVER).DecodeId(idStr)
	if err == nil {
		user, err := c.auth.FindUser(id)
		if err == nil {
			data := c.ViewData(user.GetEmail() + " info")
			data["User"] = user
			c.View("userinfo_detail.tmpl", data)
		}
	}
}
Esempio n. 2
0
func AllMember(c *controller) {
	limit, err := strconv.Atoi(c.Get("limit", false))
	if err != nil {
		limit = 20
	}

	var userLst []membership.User

	offsetStr := c.Get("offsetId", false)
	offsetId, err := model.MustLoad(MODELDRIVER).DecodeId(offsetStr)
	if err == nil {
		userLst, err = c.auth.FindAllUser(offsetId, limit)
	} else {
		userLst, err = c.auth.FindAllUser(nil, limit)
	}

	if err == nil {
		data := c.ViewData("Member List")
		data["UserLst"] = userLst
		c.View("member_list.tmpl", data)
	}
}