FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Get current user
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Get current user [message #161971] Sun, 28 February 2010 19:59 Go to next message
Slicke is currently offline  Slicke   Sweden
Messages: 3
Registered: February 2010
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi!

Im trying to get the person logged into my forum from my own .php file.

Ive used:

Citat:

require_once("../forum/GLOBALS.php");
fud_use('db.inc');
fud_use('cookies.inc');
$fuduser = ses_get();

echo 'you are ' . $fuduser->alias;


But I dont get any output at all.

Any ideas why?

Thanks!
Re: Get current user [message #163853 is a reply to message #161971] Sun, 05 December 2010 09:18 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
See example at FUDAPI.

BTW, if you get a blank screen in PHP, add this to the top of you code to see what's going on:

<?php
error_reporting(E_NOTICE | E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR);
ini_set('display_errors', '1');
ini_set('display_startup_errors', 1);
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Adding Google AdSense?
Next Topic: How to retain headers when using maillist.php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Dec 15 18:33:50 EST 2017

Total time taken to generate the page: 0.00668 seconds