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

Home » FUDforum » How To » Get current user
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Get current user [message #161971] Mon, 01 March 2010 00:59 Go to next message
Slicke is currently offline  Slicke   Sweden
Messages: 3
Registered: February 2010
Karma: 0
Junior Member
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 14:18 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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);
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Mon Nov 25 03:27:54 GMT 2024

Total time taken to generate the page: 0.02579 seconds