Get logged in user

Discussion in 'Developers' Forum' started by Kludd, Apr 13, 2011.

  1. Kludd

    Kludd New Member

    Hello

    I'm quite new to ispconfig and I am currently developing a new module. This is rather embarassing, because the answer i probably easy, but how do I get the current logged in username?

    I have coded my own payment script, and I need to crosscheck between the ispconfig database, and my payment scripts database.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Use this to get the full user details:

    print_r($_SESSION['s']['user'])
     
  3. Kludd

    Kludd New Member

    That gives me no output at all, it seems as if $_SESSION is completely empty.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to do that in a file that belongs to ispconfig. This means that it has to include the config file and app file as required for all files used in the ispconfig interface.

    If you call it outside of the ispconfig app contect, then it will be empty of course.
     

Share This Page