Gossamer Forum
Home : General : Databases and SQL :

General question about syncing files

Quote Reply
General question about syncing files
Hi guys,

I’m looking for some general advice of hacking my sites to I can sync username and password files/database between different applications. This can be done manually with a button press myself, or automatically when the user registers etc. I have no SSI or cron available.

I use community to register a login. I also have 2 other applications that have a user database. Currently I have to also ad them to this manually. I’m looking for ideas to sync the community users in the database with 1 a file and 2 the other is another record in the database.

Also once the user accounts are synced then transparently passing the user information to the other applications.

Some general advice would be good to see if I can do it myself or if I will have to get someone in to do it.

Thanks guys,

Cat
Quote Reply
Re: [catlovette] General question about syncing files In reply to
One suggestion is consolidating your data into one user table, rather than using multiple user tables. I believe that you could use your GT Community User table as your central user table. It becomes messy when you maintain multiple user tables, especially with updating data from one table to another.

What you could do is add a Sites table into your system for tracking your different sites, then add an intersection table between Sites and the GT Community User table.

So, it would look like the following:

Sites
SiteID (INT, AUTO, PRI)
Site_Name (TEXT, NOT NULL)
Site_URL (TEXT, NOT NULL)

User_Sites
SiteID (INT, NOT NULL, INDEX)
UserID (INT, NOT NULL, INDEX)

Then you'd have to re-write your authentication query a bit that checks to see if the User has access to that particular website.

You could also replicate this logic to the application level, tracking access by appplication, with an Applications table and an intersection table called User_Applications.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] General question about syncing files In reply to
Thanks for the answer. I know that have more normalised data is the correct way of doing it but to go down that root i need to learn alot more or get someone else to do it.
I was hoping more to patch it together Smile



C