Jump to content

Nasten

New Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Nasten

  1. 1 hour ago, gizmola said:

    I'm not sure what you are after there.  Those are simply environment variables from the server running php.  What is your server stack? Are you running IIS, Apache?  What is the OS of the server?

    You stated that you have  a simple login.  What I've done in the past, is to have the login make LDAP calls to active directory to authenticate the user.  

    Before you go down the LDAP road, If you are lucky and your environment intrinsically supports this, you could try to echo this value:

     

    
    echo "Current User is {$_SERVER['AUTH_USER']}";
    

     

    Server is win2016, i run apache with xampp. IIS (?). The command did not work :/. I do not even like a new authentification with ldap, i just would like to display the name od the current active user account.

  2. On 5/7/2020 at 7:24 AM, gizmola said:

    Yes, you can make LDAP calls in php, to your AD.  That would likely be the way I would do it from what little you've said.  AD is compliant with LDAP.

    I did try some diffrent things with php, :

    <?php $username = getenv('USERNAME') ;//?: getenv('USER'); echo $username."<br />"; print shell_exec( '%username%' )."<br />"; $test= get_current_user(); echo $test; ?>

    first will just print out the Computer name, second prints "System".

  3. Yeah i just want to get the Name off the current active user account which is signed in. I only got the computer name so far, but that's not what iam aiming for.

    I will look into your advice these days thanks, to you both.

  4. Hi,

    iam pretty new and have made a forum style page for intern project display. ATM i use a standard php loginscript, just so i can add the author of the text.

    But as you can imagine thats pretty inconvinient.

    Is their a way to get the username from my roaming profil or from the current AD user (dont need to auth, just so i can add my nameunder post, like i login on windows with username "Heinz", and write a post on my side, so he can take the username "Heinz" and display it beneth the post?

    iam pretty clueless where to start looking, would you be so nice and provide me some topic/hints to give me a push in the right direction.

     

    Sry if my english is..... a bit rubbish.

    i greatfull for all your time

    sincerly

    Nasten

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.