/** * Get the data */ private function getData() { // get the record $this->record = (array) BackendMailmotorModel::getAddress($this->email); // no item found, throw an exceptions, because somebody is f*****g with our URL if (empty($this->record)) { $this->redirect(BackendModel::createURLForAction('Addresses') . '&error=non-existing'); } // get subscriptions (key/pair values) $this->subscriptions = BackendMailmotorModel::getGroupsByEmailAsPairs($this->email); // the allowed groups $allowedGroups = array_keys($this->subscriptions); // set the passed group ID $this->id = \SpoonFilter::getGetValue('group_id', $allowedGroups, key($this->subscriptions), 'int'); // get group record $this->group = BackendMailmotorModel::getGroup($this->id); }