PDA

View Full Version : How to return the id of logged in user **SOLVED**


kimlaine
07-01-2007, 11:53 AM
Hi,

I would like to have the logged in userid to be automatically filled in a form. I've tried what was said in the manual page 43:

********************
You create a hidden "text field" element that contains the user id, add the default text of:

globl $my;
return $my->id;

Select the “eval” checkbox for that element...
*********************

First got an errormessage of the "globl" but after changing that to "global" that dissapeared. But it still does not return the id. I'm sure it can be done but as my knowledge of this is quite limited any help would be highly appreciated.

Thx in advance,

Kim

rob
07-03-2007, 08:24 AM
global $my;
return $my->id;

with eval checked on the element, should work, are you checking it whilst logged in?