For users logged in with frontEndUsers module.
What is the best way to get the currently logged in user id?
What is the best way to get the current (logged in) user ID?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: What is the best way to get the current (logged in) user ID?
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
if you want it in a udt, you can get a reference to the FrontEndUsers module and use the functions in FrontEndUsers.api.php
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: What is the best way to get the current (logged in) user ID?
This is from within a module in php.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: What is the best way to get the current (logged in) user ID?
$feu =& $this->GetModuleInstance('FrontEndUsers');
$uid = $feu->LoggedInId();
$uid = $feu->LoggedInId();
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.