civicrm

civi db query fail

  1. <?php
  2.   //$query = "SELECT c.display_name FROM users a, civicrm_uf_match b, civicrm_contact c WHERE a.uid='1' AND a.uid=b.uf_id AND c.id=b.contact_id";
  3.   //$query = "SELECT c.display_name FROM users

CiviCRM hook_user to not set an empty $_SESSION["civicrm"] for anonymous users - needed for Pressflow

  1. function civicrm_user( $type, &$edit, &$user, $category = NULL )
  2. {
  3.     $current_user = $_GLOBALS["user"];
  4.                
  5.                 if($current_user->uid == 0 && (arg(0) == "user" && is_numeric(arg(1)))) {
  6.                   retur

Fix for CiviCRM hook_user to not set an empty $_SESSION["civicrm"] for anonymous users - needed for Pressflow

  1. function civicrm_user( $type, &$edit, &$user, $category = NULL )
  2. {
  3.     $current_user = $_GLOBALS["user"];
  4.                
  5.                 if($current_user->uid == 0 && (arg(0) == "user" && is_numeric(arg(1)))) {
  6.                   retur
xurizaemon's picture

get civicrm custom field id and field details

  1.         /**
  2.          *
  3.          * @TODO make this more restrictive - could return wrong result if there are
  4.          * more than one custom field with the same label
  5.          */
  6.         function _green_civicrm_get_custom_field( $label )

Fix for CiviCRM: Creating Newsletter Subscriber and Adding to Group

  1. <?php
  2. function bronto_add_civicrm($form_values, $params = array()){
  3.  if (module_exists('civicrm')) {
  4.     civicrm_initialize(true);
  5.         require_once 'api/crm.php';
  6.        

CiviCRM: Creating Newsletter Subscriber and Adding to Group

  1. <?php
  2. //the function below simultaneousy adds new contacts to CiviCRM
  3. function bronto_add_civicrm($form_values, $params = array(), $groups = array()) {
  4.   if (module_exists('civicrm')) {
Syndicate content