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 8422655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:30:55+00:00 2026-06-10T03:30:55+00:00

I want to know where do i get or how do i get the

  • 0

I want to know where do i get or how do i get the user details
such as username, id number and email when he/she logs-in in an intranet of
a corporate network using PHP?

I want to use those details to automatically authenticate user to the web-application
i am developing.

I have read about AUTH_USER but where or how do i access the variable?

  • 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-10T03:30:57+00:00Added an answer on June 10, 2026 at 3:30 am

    You can do most of what you want via PHP LDAP functions. The only catch is that you would need to get a unique item to each user. You will have to do a little more research, but I am pretty sure that if you use IIS as the webserver rather than Apache, there is some quirk or trick to getting the logon/username of the person on the other end – which you could then use to query against LDAP in the following manner:

    <?php
    // $ds is a valid link identifier for a directory server
    
    // $person is all or part of a person's name, eg "Jo"
    
    $dn = "o=My Company, c=US";
    $filter="(|(sn=$person*)(givenname=$person*))";
    $justthese = array("ou", "sn", "givenname", "mail");
    
    $sr=ldap_search($ds, $dn, $filter, $justthese);
    
    $info = ldap_get_entries($ds, $sr);
    
    echo $info["count"]." entries returned\n";
    ?>
    

    Apache will just return AUTH_USER as blank. A workaround would be to create a one off request for their logon, store it in a cookie and use the same LDAP queries to get up-to-date info on the user.

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

Sidebar

Related Questions

I want to know how to get user mapping details in sql server 2005,whether
I want to know how to get client IP address using jQuery? Is it
I want to know how to get mp3 file details like artist, title, album
I want to know how to get a 4-digit random number in Java. I
Using WebRequest I want to know if I get a 302 Moved Temporarily response
I want to know how we can get record count using reference cursor in
I want to know how to see get the printing details which any other
I want to know how to get the user loggin history for MS Dynamics
I want to know how to get the cursor position on Windows in c++,
I want to know how to get the total size of the modified files

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.