Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Saturday, May 18 2013 @ 08:02 PM EDT


 Forum Index > Extensions > Cool Hacks New Topic Post Reply
 get username
   
Anonymous: mick
 10/07/04 07:04AM (Read 1242 times)  



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
Dirk
 10/07/04 02:15PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Use the global $_USER array:
PHP Formatted Code
if (empty ($_USER['uid']) || ($_USER['uid'] == 1)) {
    // anonymous user
} else {
    echo "Current user is " . $_USER['username'];
}
 

bye, Dirk

 
Profile Email Website
 Quote
Content generated in: 0.75 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content