Has anyone here know how to get Drupal to share the 'users' table with another database?
(Or, in other words, connect to a different database to access the 'users' table.)
I have a "people" database that I share between all my different projects, so that all of my clients/users need not sign up multiple times. Signing up to anything gets them signed up to everything. Change their name/email/password once, it's changed everywhere.
I've been able to do this because I was hand-coding all of my projects, but now I'd like to use Drupal, yet still access this central "users" table (I can make it exactly fit Drupal's specs/schema).
Perhaps there's a different way to achieve what I'm trying to do?
Any suggestions or pointers?
Thanks much.
Use openid for all your projects.
Sent from my iPhone (please excuse the terse message).
On Mar 7, 2009, at 6:44 PM, Thoughts Ltd domains@thoughts.pro wrote:
Has anyone here know how to get Drupal to share the 'users' table with another database?
(Or, in other words, connect to a different database to access the 'users' table.)
I have a "people" database that I share between all my different projects, so that all of my clients/users need not sign up multiple times. Signing up to anything gets them signed up to everything. Change their name/email/password once, it's changed everywhere.
I've been able to do this because I was hand-coding all of my projects, but now I'd like to use Drupal, yet still access this central "users" table (I can make it exactly fit Drupal's specs/ schema).
Perhaps there's a different way to achieve what I'm trying to do?
Any suggestions or pointers?
Thanks much.
-- [ Drupal support list | http://lists.drupal.org/ ]
On Sun, Mar 8, 2009 at 5:44 AM, Thoughts Ltd domains@thoughts.pro wrote:
Has anyone here know how to get Drupal to share the 'users' table with another database?
(Or, in other words, connect to a different database to access the 'users' table.)
I have a "people" database that I share between all my different projects, so that all of my clients/users need not sign up multiple times. Signing up to anything gets them signed up to everything. Change their name/email/password once, it's changed everywhere.
I've been able to do this because I was hand-coding all of my projects, but now I'd like to use Drupal, yet still access this central "users" table (I can make it exactly fit Drupal's specs/schema).
Perhaps there's a different way to achieve what I'm trying to do?
Any suggestions or pointers?
Some resources that you may find useful:
For Drupal 6, check these API functions: http://api.drupal.org/api/function/user_external_load http://api.drupal.org/api/function/user_external_login/6 (Drupal 6 only) http://api.drupal.org/api/function/user_external_login_register/6 (Drupal 6 only) and generally the user API http://api.drupal.org/api/file/modules/user/user.module/6
See how the first two are used in the code of http://api.drupal.org/api/function/openid_authentication/6 (Drupal 6 only)
For Drupal 5, you can find a few relevant discussions around such as http://drupal.org/node/151515 http://www.darrenmothersele.com/content/using-external-data-source-drupal-us... Maybe also the code of openid_authentication() in http://drupal.org/project/openid
If your solution involves a Drupal bootstrap in an external php script, make sure to set the $cookie_domain in Drupal's settings.php file.
Thanks much.
-- [ Drupal support list | http://lists.drupal.org/ ]