Custom Sessions with Joomla

后端 未结 7 1268
小蘑菇
小蘑菇 2020-12-30 17:45

I\'ve trying to build Joomla into my existing website so I can use it for premium content.

I\'ve already got a custom-built authentication system that sets my own

7条回答
  •  天涯浪人
    2020-12-30 18:43

    Joomla will most likely initialize it's own session (we'll call it session "B") separate from the other system you're talking about which determines if the user gets the "premium" session (we'll call this session "A"). Once session "B" starts, I don't think it will be possible for session "B" to access information in session "A".

    My suggestion for getting around this would be to write the session handling code in pure PHP and run that code before Joomla loads it's own session. That way when you run session_start() it should catch session "A".

    A good way to get this into Joomla would be to write a "System" plugin and call the function "onAfterInitialise" this function get's called before Joomla has even setup it's session (at least, I'm pretty sure about that.. haha).

    
    

提交回复
热议问题