Пример #1
0
//删除用户
func (this *UserController) Delete() {
	id, _ := this.GetInt64("id")
	if id == 1 {
		this.showmsg("不能删除ID为1的用户")
	}
	user := models.User{Id: id}
	if user.Read() == nil {
		user.Delete()
	}

	this.Redirect("/admin/user/list", 302)
}