HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Get logged in user (http://www.howtoforge.com/forums/showthread.php?t=52272)

Kludd 13th April 2011 16:49

Get logged in user
 
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.

till 13th April 2011 17:16

Use this to get the full user details:

print_r($_SESSION['s']['user'])

Kludd 13th April 2011 18:00

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

till 13th April 2011 18:17

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.


All times are GMT +2. The time now is 09:46.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.