Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
2 txp webiste with same user table?
Hi
I have 2 txp website with 2 différent domains, is it possible to both to share the same user table?
I dont know how to handle that! sincing the 2 tables? I can make them share the same DB using the prefix table, but how to make the user table the same is not clear in my mind!
Help appreciated.
Offline
Re: 2 txp webiste with same user table?
I don’t think that is possible without modifying TXP code.
You could create/delete/modify users in one TXP install and periodically copy the txp_users content to the other TXP install.
Offline
Re: 2 txp webiste with same user table?
Thanks ruud for the answer
I was digging a little on Mysql and found information about views, we can create a view from a table with this code:
CREATE VIEW new_txp_users AS SELECT * FROM txp_users;
But i should test that the view is working like a regular table on localhost to see if that work!
ADD: I tested it on localhost and that works, i can access both txp installation with the same user table, i can also make changes on user data in both installation! that’s really funny!
Last edited by Dragondz (2015-11-26 14:45:44)
Offline
Re: 2 txp webiste with same user table?
ruud wrote #296832:
You could create/delete/modify users in one TXP install and periodically copy the txp_users content to the other TXP install.
Offline
Re: 2 txp webiste with same user table?
In a live scenario if websites A and B are located in different servers, and A is the main website, you might have to allow external database access for B. This kind of arrangement could cause latency issues for B.
Offline
Re: 2 txp webiste with same user table?
I think allowing external database access will be more problematic than the latency (the users table typically doesn’t change a lot).
Still learning new stuff about TXP. First time I noticed those callbacks ;)
Offline
Pages: 1