We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

extending the authorization system

Development and Programming

ffurger's avatar
ffurger
220 posts
16 years ago
ffurger's avatar ffurger

I am developing a module for integrating an open source ajax chat into EE. For this purpose I want to rely on the EE authorization system to log users into the chat and define their access rights. To accomplish this, I need three additional tables, one that assigns a predefined role to each registered user, a table containing a list of chat rooms, and a table that defines who has access to which room.

Now, implementing the tables is easy enough, but I ran into a problem: the exp_member table in EE relies on the MyISAM engine. This means that I can’t use foreign keys in my table to define a relationship between users and roles (this is only possible with the innoDB engine). This also means that I can’t ensure consistency in my new tables when users are removed from the exp_members table.

I could write a small extension that on removing a user in EE also removes the entries for that user in the chat tables, but then I would have to deal with an extention AND a module.

I could also write a cron job to execute a periodical integrity check and remove users from the chat tables that have been removed from the exp_members table.

Neither approach is particularly attractive to me, so I am wondering:

is it possible to implement the extention as part of the chat module? Are there any other ways to ensure the integrity of the chat tables?

Thank you for your help,

Franco

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Actually, EE doesn’t leverage any of the features of particular table types (such as foreign keys), so if you feel strongly about the engine, make a backup (as always), and try to change it.

       
ffurger's avatar
ffurger
220 posts
16 years ago
ffurger's avatar ffurger

Ok, that’s interesting, thank you.

So how does EE ensure consistency across tables, if it doesn’t rely on innoDB? My understanding is that MyISAM tables don’t support foreign keys, so it may be difficult to make sure that related tables don’t get out to sync. Or is there some other way to achieve consistency in MySQL without relying on foreign key?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.