Hi!

I want to have some sites on drupal like subdomains in "biguse.net" - "music.biguse.net", "sport.biguse.net" and others.

How can I make something, like this:
- user make one registration and can login on every subdomains with his data (now it working - registration user "test" on "biguse.net" and loging on "music.biguse.net" with data: user/login="test@biguse.net" and password),
- when user go from "music.biguse.net" to "sport.biguse.net" - he still is logged, on "sport.biguse.net" - he don't have to loging again on "sport.biguse.net" (HOW TO DO THIS???)

I can't use ldap module - I have no acces to any ldap server.

What modules gives this features?

best regards

Comments

cog.rusty’s picture

I was wondering about this too... If they are different sites, they have to use either different databases or different table prefixes in the same database.

Has anyone come up with a way for all (or some) sites to use the same user tables? Or perhaps an external automatic operation to synchronize the user tables across different databases/prefixes?

Lupin3rd’s picture

You can share tables. It's very simple.
Look at this.

But CogRusty would use same login in 3 sites, then when a user login in portal 1 this portal must create cookie for portal1 and for all others portal 2 and 3... this can be a way.

---
Visita drupal.it, la comunità italiana di Drupal.

cog.rusty’s picture

Oops! Somehow, I had missed the "advanced" db prefixing link.
Thanks.

kors4r@www.zalety.linux-disc.com’s picture

oki, coockie, but tell me: in every sites, in databases should stay this same data of this user, write?

I was tried with a array in db_url, but it don't works, in my case it looks:

$db_url = array(
'default'   => 'mysql://kors4r:pwd@localhost/database_1',
'users'     => 'mysql://kors4r:pwd@localhost/database_2',
'sessions'  => 'mysql://kors4r:pwd@localhost/database_2',
'role'      => 'mysql://kors4r:pwd@localhost/database_2',
'authmap'   => 'mysql://kors4r:pwd@localhost/database_2',
'sequences' => 'mysql://kors4r:pwd@localhost/database_2',
);

in my case prefixes and tables in same database is not good idea, i will have about 30 subsites, and in every subdomain will be more then 50.000 nodes, so I need have nodes from one site in one database

kors4r@www.zalety.linux-disc.com’s picture

is it possible to use in one drupal installation 2 databases?

1. - with all data

2. - with data about users

in "settings.php" i was read, that I can use 1 database to more then 1 site adn use a "prefix" for tables,

data abotu prefix I can write like array - some tables will be used only for 1 site, some tables will be used by more then one site

is it possible, to share users tables for more then 2 sites, if every site use other database?

cog.rusty’s picture

Here it says that you can but I am not sure

Super advanced usage
http://drupal.org/node/22268

The suggestion is to use "users" => "dbname." instead of "prefix_" in the $db_prefix array, but I don't believe it works, because of the different db usernames/passwords.

Someone in that thread suggested to use an array like yours in $db_url but he didn't really try it because of a problem between Drupal and his host's naming conventions (an underscore). I have the same host naming convention, so I have not tried it and don't know whether it works.

kors4r@www.zalety.linux-disc.com’s picture

IMO this is write - the problem is in drupal-cookie-creating-process

I have one database and tables with prefixes, but drupal by loging user create cookie only for one subdomain

how to make a cookie for all subdomains?

seandunaway’s picture

try using ini_set() to set session.cookie_domain to the .domain.com your subdomains belong to?