public static function getPendingBySubscriber($id) { expeAlerts::getBySubscriber($id, true); }
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)); }