/** * Get Memberships. * * @return mixed The array of User objects if successful, otherwise false */ public function getMembership() { $url = $this->getSetting('custom_context_memberships_url'); $service = new Service\Membership($this, $url); $response = $service->get(); return $response; }
/** * Get Memberships. * * @return mixed The array of User objects if successful, otherwise false */ public function getMembership() { $response = false; if (!empty($this->contextId)) { $url = $this->getContext()->getSetting('custom_context_memberships_url'); if (!empty($url)) { $service = new Service\Membership($this, $url); $response = $service->get(); } } return $response; }