Welcome Guest, Not a member yet? Register   Sign In
Syncing Codeigniter Modules

I have several codeigniter applications that are separate modules but need to interface with the membership module to:

1. Sync login so member only logs in once and can go to different modules
2. Validate Membership level prior to giving access to priviledges
3. Validate Active subscription
4. Deposit/record information in a part of membership profile
For example, a fundraising module need to record members fundraising activity
blog which is in wordpress need to record blog post or comment in profile

Thanks for your feedback.

My advice,I would start with a common authentication library, I have used a few of the ones found in the forums sum are outofdate so pick carefully.

My next step would be a common database where I would store the session information and any user details.
I recommend keeping this separate from your application database.

You will need to manually set you database connections example can be found here in the user guide.


Now override the session library to use your chosen database group, by default it will use the active group from the database.php config file, I have done it in the past I copy the session library into a MY_Session.php and set a class variable to hold the DB connection and use that in the methods. If your confident only take a few hours with good testing.

For the privileges I would point you towards the Zend ACL , which can be imported and used there are a few tutorials from google.

good luck

Thanks you so very much, I'll try your suggestion.

Stay blessed! :=)

[eluser]Myles Wakeham[/eluser]
If it helps, we have a similar need with one of our customers (who we have developed a couple of CI projects for). What I did was to move the authentication process completely out of the applications, and into its own 'user management' CI app. I use SOAP or REST to communicate between the apps, so when a user wants to login to a client app, it will message the master and get a server side session ID for it (I'm using PHPSessions CI library for this). That session ID can carry between the applications, and with centralized logging for all apps, it means single sign on for the users.

Its also really modular to do it this way because if my client has to integrate the CI apps with a master corporate directory service (ie. LDAP) then it can work with that too. That way an employee can login once in the morning and all apps that they use can work with a common LDAP repository for authentication.

You will need to be able to provide application managers with user, group and permission management of course but if that is handled in one central app, you can give out security permissions to all application functions by having the apps 'register' their functionality with the master user management app.

When you think about it, its like having a locked door on each room, vs. having one big master lock on the entry way, and all internal doors are open once you are authenticated.



Many thanks. We'll try that and I'll let you know.

Stay blessed! :=)

Theme © iAndrew 2016 - Forum software by © MyBB