Welcome to Geeklog, Anonymous Wednesday, May 15 2024 @ 11:33 pm EDT

Geeklog Forums

auth.inc.php?


Alager

Anonymous
Hi, i\'m making a swedish geeklog site and thougt it would be cool with a diary. But i need to check if the user is logged in, when you inlcude the file auth.inc.php checks if the user is an administrator, does it exist any file that does the same but with logged in users? Question
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Text Formatted Code
if ($_USER['uid'] > 1)
is a simple way to check if the current user is logged in (anonymous user have a uid == 1). bye, Dirk
 Quote

Alager

Anonymous
OK, thank you!
 Quote

All times are EDT. The time is now 11:33 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