[SOLVED]pass logged in uid to FEU for user profile

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
cleatus
Forum Members
Forum Members
Posts: 27
Joined: Mon Jul 18, 2011 4:36 pm

[SOLVED]pass logged in uid to FEU for user profile

Post by cleatus »

what is the current best way to display current logged in user's feu properties without manually designating uid? both FEU and CGuserdirectory appear to need the uid. what is the best way to pass current logged in user's uid to {FrontEndUsers action="viewuser" uid=""} or {CGUserDirectory action="detail" uid=""} ?

cmsms 1.10.3
feu 1.17
custom content 1.7.3
Last edited by cleatus on Tue Feb 21, 2012 5:03 pm, edited 2 times in total.
cleatus
Forum Members
Forum Members
Posts: 27
Joined: Mon Jul 18, 2011 4:36 pm

Re: pass logged in uid to FEU, CGuserdirectory for user prof

Post by cleatus »

well i've got current logged in user's username and group memberships showing on front end using the following from custom content module:

Code: Select all

{if $ccuser->loggedin()}
<p>Username:<strong>{$customcontent_loginname}</strong></p><p>My Current Groups and Memberships:<strong>{$customcontent_groups}</strong></p>
<p>{$ccuser->property('alt_email')}</p>
{else}
<p>You are not logged in.</p>{/if}
now, does anyone know how to display all other front end user properties?

specifically, how to use

Code: Select all

$ccuser->property('propertyname')
from custom content help page?

right now i used

Code: Select all

{$ccuser->property(alt_email)}
(left missing quotes referenced by dr.css in post below for reference purposes)
or

Code: Select all

{$ccuser->property('ph')}
just in case it didn't like the underscore

but i get error:
Warning: Invalid argument supplied for foreach() in /home/www/site.org/modules/FrontEndUsers/lib/class.FrontEndUsersManipulator.php on line 1620

thanks in advance.
Last edited by cleatus on Sun Feb 19, 2012 12:07 am, edited 2 times in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: pass logged in uid to FEU, CGuserdirectory for user prof

Post by Dr.CSS »

Notice the missing ' ' in your call?...
cleatus
Forum Members
Forum Members
Posts: 27
Joined: Mon Jul 18, 2011 4:36 pm

Re: pass logged in uid to FEU, CGuserdirectory for user prof

Post by cleatus »

thanks for the response. yes, i wasn't sure if that was part of the call or used to denote "example".
with or without quotes i get the same error. the property name is correct and a property of logged in user. i'm assuming i'm just using it wrong, but not sure how. am i correct that this can be used to get and display specified FEU properties for current logged in ccuser?

note: i edited above code to more accurately reflect my current effort. i noticed i had also left an old line in previous post as well.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: pass logged in uid to FEU, CGuserdirectory for user prof

Post by Dr.CSS »

Have you tried the {get_template_vars} tag, it should output all variables...
cleatus
Forum Members
Forum Members
Posts: 27
Joined: Mon Jul 18, 2011 4:36 pm

Re: pass logged in uid to FEU, CGuserdirectory for user prof

Post by cleatus »

thanks again, doc.
i had tried {get_template_vars} previously but had trouble dumping third level variables. anyways you forced me to look at it again. It ended up being a permissions issue. for some reason FEU permissions were different from everything else on server. Sorry for wasting your time on that.

So {$ccuser->property('propertyname')} works after all. Also, when i went to submit feature request for FEU for the ability to use loggedin() instead of uid for "viewuser" param i noticed it had already been requested and evidently will be in next version of FEU!
http://dev.cmsmadesimple.org/feature_request/view/7260
So i'll use a combination of FEU changesettings form and custom content for profile page until FEU's viewuser params are updated.
Post Reply

Return to “Modules/Add-Ons”