CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • support Drupal's $db_prefix
Pages: [1]

Author Topic: support Drupal's $db_prefix  (Read 1796 times)

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
support Drupal's $db_prefix
July 19, 2011, 03:17:06 pm
I have a client who's running two Drupal sites (a "Drupal multisite" installation) that share a single `users` table.  This places the users table in a database other than the one defined in CIVICRM_UF_DSN.  This is fine, except when running scripts like bin/civimail.cronjob.php.

At present, scripts under bin/ are authenticating with CRM_Utils_System::authenticate(), which in Drupal is hard-wired to search in the `users` table in the CIVICRM_UF_DSN database. Thus, the civimail user can't authenticate.

Is it worth trying to patch CRM_Utils_System::authenticate() to support Drupal's $db_prefix variable? Is there a better way around this problem?

Thanks,
Allen
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: support Drupal's $db_prefix
July 19, 2011, 03:53:48 pm
There is a UI setting under admin settings 'CMS integration' where you can set the users table. I do recall a thread talking about a solution where this wouldn't be required - it's somewhere on the forum.....

We use shared user tables a lot & our crons seem to run - presumably because we fill in the CMS integration and / or the table name in settings.php
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

TwoMice

  • I post frequently
  • ***
  • Posts: 214
  • Karma: 16
    • Emphanos
  • CiviCRM version: Always current stable version
  • CMS version: Drupal 7
Re: support Drupal's $db_prefix
July 19, 2011, 04:53:16 pm
Thanks, Eileen. That fixed it.
Please consider contributing to help improve CiviCRM with the Make it Happen! initiative.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • support Drupal's $db_prefix

This forum was archived on 2017-11-26.