Page 1 of 1

What is the best way to get the current (logged in) user ID?

Posted: Wed Feb 27, 2008 4:50 pm
by genepilot
For users logged in with frontEndUsers module.

What is the best way to get the currently logged in user id?

Re: What is the best way to get the current (logged in) user ID?

Posted: Wed Feb 27, 2008 4:53 pm
by calguy1000
well if you want it in smarty use the customcontent module

if you want it in a udt, you can get a reference to the FrontEndUsers module and use the functions in FrontEndUsers.api.php

Re: What is the best way to get the current (logged in) user ID?

Posted: Wed Feb 27, 2008 5:04 pm
by genepilot
This is from within a module in php.

Re: What is the best way to get the current (logged in) user ID?

Posted: Wed Feb 27, 2008 5:25 pm
by calguy1000
$feu =& $this->GetModuleInstance('FrontEndUsers');
$uid = $feu->LoggedInId();