public static function getPendingBySubscriber($id) { expeAlerts::getBySubscriber($id, true); }
/** * save module configuration */ function saveconfig() { // create a new RSS object if enable is checked. if (!empty($this->params['enable_rss'])) { $rssfeed = new expRss($this->params); $rssfeed->update($this->params); } // create a new eAlerts object if enable is checked. if (!empty($this->params['enable_ealerts'])) { $ealert = new expeAlerts($this->params); $ealert->update($this->params); } // unset some unneeded params unset($this->params['module']); unset($this->params['controller']); unset($this->params['src']); unset($this->params['int']); unset($this->params['id']); unset($this->params['cid']); unset($this->params['action']); unset($this->params['PHPSESSID']); // setup and save the config $config = new expConfig($this->loc); $config->update(array('config' => $this->params)); flash('message', gt('Configuration updated')); expHistory::back(); }
public function confirm() { global $db; // make sure we have what we need. if (empty($this->params['key'])) { expQueue::flashAndFlow('error', 'The security key for account was not supplied.'); } if (empty($this->params['id'])) { expQueue::flashAndFlow('error', 'The subscriber id for account was not supplied.'); } // verify the id/key pair $id = $db->selectValue('subscribers', 'id', 'id=' . $this->params['id'] . ' AND hash="' . $this->params['key'] . '"'); if (empty($id)) { expQueue::flashAndFlow('error', 'We could not find any subscriptions matching the ID and Key you provided.'); } // activate this users pending subscriptions $sub->enabled = 1; $db->updateObject($sub, 'expeAlerts_subscribers', 'subscribers_id=' . $id); // find the users active subscriptions $ealerts = expeAlerts::getBySubscriber($id); assign_to_template(array('ealerts' => $ealerts)); }