Welcome to Geeklog, Anonymous Friday, November 08 2024 @ 09:57 pm EST
Geeklog Forums
Finding out who is logged in
LetsTalkSkiRacing
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?
12
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
There's a good introduction to Geeklog programming on our wiki.
bye, Dirk
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
Text Formatted Code
if (SEC_inGroup("Customer")) ...There's a good introduction to Geeklog programming on our wiki.
bye, Dirk
14
13
Quote
All times are EST. The time is now 09:57 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content