*
* @return array|bool
* [contactID, ufID, unique string] else false if no auth
+ * @throws \CRM_Core_Exception.
*/
public function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
return FALSE;
/**
* Immediately stop script execution and display a 401 "Access Denied" page.
+ * @throws \CRM_Core_Exception
*/
public function permissionDenied() {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
}
/**
return FALSE;
}
+ /**
+ * Is a front end page being accessed.
+ *
+ * Generally this would be a contribution form or other public page as opposed to a backoffice page (like contact edit).
+ *
+ * @todo Drupal uses the is_public setting - clarify & rationalise. See https://github.com/civicrm/civicrm-drupal/pull/546/files
+ *
+ * @return bool
+ */
+ public function isFrontEndPage() {
+ return CRM_Core_Config::singleton()->userFrameworkFrontend;
+ }
+
/**
* Get user login URL for hosting CMS (method declared in each CMS system class)
*