Page 1 of 1
- how to get frontend username inside plugin code
Posted: Tue Nov 06, 2007 9:56 pm
by mikemcvey
Hi,
I am writing a download plugin and want to be able to track downloads by FrontEndUsers - username.
I know the username is in the page template and in the gCms object but unsure how to access them.
Any ideas?
Mike
Re: - how to get frontend username inside plugin code
Posted: Tue Nov 06, 2007 9:59 pm
by calguy1000
Code: Select all
global $gCms;
$feu =& $gCms->modules['FrontEndUsers']['object'];
echo $feu->LoggedInName();
Re: - how to get frontend username inside plugin code
Posted: Tue Nov 06, 2007 10:03 pm
by mikemcvey
Calguy thanks
I had just found another thread which had something similiar...
but you where too fast!
Thanks.. your posts on the forum are very helpful.
Cheers
Mike
Re: - how to get frontend username inside plugin code
Posted: Tue Nov 06, 2007 10:15 pm
by mikemcvey
Any chance of helpng me out to get the username - email - name etc?
I had a quicl look in the api but maybe I will have to qury the db myself to the get info.
Mike
Re: - how to get frontend username inside plugin code
Posted: Tue Nov 06, 2007 10:17 pm
by calguy1000
print_r( $feu->GetUserProperties( $feu->LoggedInId() ) );
Re: - how to get frontend username inside plugin code
Posted: Tue Nov 06, 2007 10:32 pm
by mikemcvey
thanks!