How to get a logged in user ID from FEU in external php file

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
boddhisattva
New Member
New Member
Posts: 1
Joined: Thu Mar 24, 2016 3:21 pm

How to get a logged in user ID from FEU in external php file

Post by boddhisattva »

I am using CMSms 2.1.1 with the FEU module installed. I have a php file in my root directory in which I want to read the User ID of the logged in user. I tried this:

Code: Select all

$feusers = cms_utils::get_module('FrontEndUsers');
$user_id = $feusers->LoggedInId();


...but that didn't work. Could anybody help me with this?

Thanks in advance.
Rinker
Forum Members
Forum Members
Posts: 65
Joined: Fri May 27, 2011 9:37 am

Re: How to get a logged in user ID from FEU in external php

Post by Rinker »

How and where do you call this file?

I don't know what this file do but I think you better can make a plugin of it and put it in the plugin dir or add the code in a UDT if it is not that big.
User avatar
magallo
Dev Team Member
Dev Team Member
Posts: 123
Joined: Thu Mar 24, 2011 12:37 am

Re: How to get a logged in user ID from FEU in external php

Post by magallo »

I have the same issue,

Code: Select all

include($_SERVER['DOCUMENT_ROOT'].'/lib/include.php');
$gCms = CmsApp::get_instance();
$feu =& $gCms->GetModuleInstance('FrontEndUsers');
$uid = $feu->LoggedInId();
nothing comes up. Can anyone help?
Thanks
Magal Hezi
Pixel Solutions, Technology Partners
magal@pixelsolutions.biz | pixelsolutions.biz

Image
Post Reply

Return to “Modules/Add-Ons”