Opened 19 years ago
Closed 17 years ago
#2622 closed enhancement (wontfix)
Allow multiple installations using single user database.
Reported by: | Denney | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.2 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
I have created the following patches to allow multiple WordPress installations using a single user database. Users are registered at one WordPress blog and the caps are then created when the user logs into another WordPress blog using the same database.
The users DO NOT inherit their roles across blogs. For example, if a user is an administrator at one blog, they will NOT automatically be an administrator at another blog. Instead, they will inherit that blogs default role.
The capabilities diff was originally created by ringmaster in ticket 2378.
NOTE: THE INSTALL.PHP DIFF IS DIFFERENT TO THE VERSION IN THE REPOSITORY. I have made changes to this file myself (like adding a password option). Do not blindly apply the patch.
Attachments (4)
Change History (9)
#4
@
19 years ago
I'm toying with the idea of adding an option in the administration section that would be a simple checkbox along the lines of "Automatically create user from shared userbase on first login".
That would partly resolve the "automatic privileges" problem as it would basically act like a normal registration. The admin can enable or disable this feature.
Just can't seem to get the option to work. Won't update for some reason. :S Anyway, just another idea.
Users shouldn't automatically be given privs on the blog. They should be assigned to a blog by an admin.
During install, automatically give the admin privs on the newly created blog. It is then up to the admin to add the user to the blog. This will require some UI.
We already have a $blog_id that can be set in wp-settings.php. The blog id can be used to create unique table names by incorporating it into the prefix. If a prefix is set to "wp%blog_id", substitute the current blog ID into the prefix when creating the tables. For the user and usermeta tables, subsititute an empty string for %blog_id since those tables should be global. The presence of %blog_id in the prefix could be the key that tells us "do multi blog stuff".
Of course, we're venturing into WPMU territory here. It already does all of this, though slightly differently. But, this might be a good way to offer basic multi blog support to those who don't need the power of WPMU.