Subject: Finding out who is logged in

Posted on: 14/12/09 07:44pm
By: Anonymous

I'm writing a little PHP and am only a beginner but want to restrict use of the program to people who are logged in. Is there a simply call I can make to find out the username of a person?

Re: Finding out who is logged in

Posted on: 15/12/09 07:27am
By: Dirk

To get the name of the current user, use COM_getDisplayName().

But to restrict access, you should really use Geeklog's permission system. You can easily create a new group, say, "Customer", and then check if the current user is in that group with
PHP Formatted Code
if (SEC_inGroup("Customer")) ...

There's a good introduction to Geeklog programming on our wiki.

bye, Dirk

Geeklog - Forum