[wp-hackers] Sharing Users/authentication

Jacob Santos dragonwing at dragonu.net
Sat Aug 25 02:56:08 GMT 2007


No. You would have to rewrite the Database Access Layer for which all 
other API functions use. Given that WordPress uses MySQL extension, it 
would be a total bitch to switch back and forth (trust me, once you get 
into this realm you'll scream for the final cut across the throat). Be 
easier with PDO or MySQLi and creating two objects with each Database 
Information. This would still require hacking the Database Access Layer 
and hacking the user API functions to use that Database Object or at 
least hacking the User API.

There might be a less painful way, but from what I know and experimented 
with, it is better to just walk away while you still have your sanity.

Jeremy Visser wrote:
> Wow, I wish someone had told me about that before. Is it possible to
> tell it to use different databases as well?
No idea. It could be any number of variables or problems. Write a ticket 
to the forums and see if someone who is experienced knows anything.

Did you change the config of the second blog? Or third? Or Fourth?

Is the second blog on the same database as the first blog?

As I have had no need to attempt something like this, I have no idea how 
to troubleshoot it. I might attempt it to see what the requirements are 
beyond setting those two constants, but I really don't think I will have 
time.

Good Luck,

Jacob Santos

Stephen Rider wrote:
> That could be extremely useful for me.  However... when I do that I 
> can't get into the admin screen on the "secondary" blog.  All I see is:
>
> You do not have sufficient permissions to access this page.
>
> The main blog still works fine.  Any idea why???
>
> Stephen
>
>
> On Aug 24, 2007, at 1:07 PM, jacobsantos at branson.com wrote:
>
>> Yes. There are defines in the wp-settings.php file that can be 
>> defined in the wp-config.php file.
>>
>> wp-config.php
>> -----------------------
>>
>> // Underneath database config info
>> define('CUSTOM_USER_TABLE', 'wp_users');
>> define('CUSTOM_USER_META_TABLE', 'wp_usermeta');
>>
>> In this way, you only need to have one wordpress users table and 
>> usermeta table. You will have to keep track of the prefix of the 
>> wordpress installation you have all of the users in.
>>
>> Jacob Santos
>>
>> Chris Lott wrote:
>>> Faculty members have discovered CommentPress and would like to use
>>> CommentPress enabled blogs alongside their regular class blogs... is
>>> there a simple way to share the usernames/logins between two WP
>>> installations? All that really needs to be shared is the login name
>>> and password...
>>>
>>> c
>>>
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list