Skip to main content

Determining the logged in user

Posted by cbbs70a on Mon, 06/16/2008

All;
I am writing some CGI/web pages to enhance functionality in the user interface. Its pretty slick to be able to add/enhance features by using the menu/link manager and still retain the same look and feel throughout. My question is this. Whats the easiest way to determine which user is logged in? It does not appear to be written in the Astdb, which might be a good place to put it in the future (hint, hint). Any insight at all would be greatly appreciated.
Thanks
FSD


Submitted by cbbs70a on Tue, 06/17/2008 Permalink

Erik;

Right now I am writing for the user portal. Things like speed-dial, an enhanced blacklist, dnd/whitelist, etc. In general, I'd imagine that Webmin has got to track this somehow. Also, shouldn't it be possible for multiple users to be logged in? That does not seem to be possible.

Thanks

Frank

Submitted by cbbs70a on Tue, 06/17/2008 Permalink

No, I mean different users logged in. Say user 200 logs into the user portal, and then user 201 logs in. As soon as 201 logs in, it essentially clobbers the session for 200. That never made sense to me. Perhaps it has something to do with Webmin.

Submitted by eeman on Tue, 06/17/2008 Permalink

im not sure i have observed that. I'm going to try and re-create that. What should user 200 expect to observe when session 201 logs in? I am assuming you dont mean from the same web browser in another window/tab.

Submitted by cbbs70a on Tue, 06/17/2008 Permalink

>I am assuming you don't mean from the same web browser in another window/tab.

Don't I feel like a jerk. Don't make assumptions when dealing with stupid people like me.

Submitted by cbbs70a on Wed, 06/18/2008 Permalink

The solution to the original problem was way too simple. To find the identity of the logged in user, it was as simple as $ENV{'REMOTE_USER'}. It's CGI 101.

FSD