Пример #1
0
func (controller *Controller) initConnectedState(id string) {
	account, _ := auth.NewAccount(id)
	controller.Account = account
	controller.AccountConnected = true
	controller.Data["accountConnected"] = true
	controller.Data["currentAccount"] = controller.Account
}
Пример #2
0
func (controller *Controller) loadAccount() {
	ID := controller.Ctx.Input.Param(":account")
	account, err := auth.NewAccount(ID)
	if err != nil {
		controller.Abort("show-database-error")
	}
	controller.Data["account"] = account
	controller.account = account
	controller.SetCustomTitle("Admin - " + account.Name)
}