* @param $loadFromDB boolean whether to load from the database
* @param $force boolean whether to force a reconstruction
*
- * @return object
+ * @return CRM_Core_Config
* @static
*/
static function &singleton($loadFromDB = TRUE, $force = FALSE) {
array(1 => array($userID, 'Integer'))
);
}
+
+ // initialize authentication source
+ self::$_singleton->initAuthSrc();
}
return self::$_singleton;
}
}
/**
- * Retrieve a mailer to send any mail from the applciation
+ * Retrieve a mailer to send any mail from the application
*
* @param boolean $persist open a persistent smtp connection, should speed up mailings
* @access private
CRM_Core_DAO::executeQuery($query);
}
+ // This method should initialize auth sources
+ function initAuthSrc() {
+ $session = CRM_Core_Session::singleton();
+ if ($session->get('userID') && !$session->get('authSrc')) {
+ $session->set('authSrc', CRM_Core_Permission::AUTH_SRC_LOGIN);
+ }
+
+ // checksum source
+ CRM_Contact_BAO_Contact_Permission::initChecksumAuthSrc();
+ }
+
/**
* one function to get domain ID
*/