Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9120381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:36:55+00:00 2026-06-17T05:36:55+00:00

I need to access the user id in my custom php script which resides

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:36:56+00:00Added an answer on June 17, 2026 at 5:36 am

    If you are not building a module (which is recommended way to extend the system), than best approach that you can take is to:

    1. Read activeCollab’s session ID that’s stored in a cookie (HTTP only, not available to JavaScript). Variable name is different from system to system and all start with 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.
    2. Once you get session key from a cookie, query 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).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom PHP script which uploads information submitted by a form
I am writing an HTMLHelper but I need to access User.Identity.Name, how do I
I need to restrict user access to filebrowser using permissions. For example, only users
I'm writing a custom php code in my Drupal website. I need to load
I'm uisng django.contrib.auth for authentication. The User mode has a custom profile model called
I've made a custom binding class which inherits from Binding: public class MyBinding :
I need to define custom constant, that would be visible in all my php
I need to access to the custom attribute or data of my link but
I need to provide my controller action methods access to a common class instance
I need access to the uint64_t typedef from stdint.h in some wrapper code that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.