protected function hasAuthUser($id = null) { $poin = $this->request->param('poin'); $this->loadModel('CharactersPowers'); $data = $this->CharactersPowers->find()->hydrate(false)->select(['player_id' => 'Characters.player_id'])->where(['CharactersPowers.power_id' => $poin])->contain('Characters')->first(); return parent::hasAuthUser(@$data['player_id']); }
protected function hasAuthUser($id = null) { $itin = $this->request->param('itin'); $data = $this->Items->find()->hydrate(false)->select(['player_id' => 'Characters.player_id'])->where(['Items.id' => $itin])->contain('Characters')->first(); return parent::hasAuthUser(@$data['player_id']); }