I need to access the user id in my custom php script which resides inside the public folder of activecollab.
I am not inside a controller,model or view. i'm outside the framework otherwise i could apply this solution: fetching logged in user data in activecollab by $this->logged_user
Thanks.
If you are not building a module (which is recommended way to extend the system), than best approach that you can take is to:
ac_activeCollab_sid_#UNIQUE-VALUE#
so you should check stored values for a system where you are already logged in to see which exact variable you should look at.acx_user_sessions
table using that key to see if session exists and who is logged in. Key format is: #USER-ID#/#SESSION-ID#/#TIMESTAMP#
so explode the value to get the bits that you need.Note that we do not recommend that you do external transformation of the data that's in the database. Read it, but don't write anything - leave that to activeCollab or implement desired functionality as a module (link provided above).