Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 05:23 am EDT

Geeklog Forums

get username


mick

Anonymous
Hi to all,
I want to integrate quickly a simply application that require authentication.
In this application the login user/password it's based on file check. I want to pass the the geeklog autohentication automatically but I where I take this information.

Thank's in advance
Mick
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Use the global $_USER array:
Text Formatted Code
if (empty ($_USER['uid']) || ($_USER['uid'] == 1)) {
    // anonymous user
} else {
    echo "Current user is " . $_USER['username'];
}
 

bye, Dirk
 Quote

All times are EDT. The time is now 05:23 am.

  • 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