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
[SOLVED]pass logged in uid to FEU for user profile
[SOLVED]pass logged in uid to FEU for user profile
Last edited by cleatus on Tue Feb 21, 2012 5:03 pm, edited 2 times in total.
Re: pass logged in uid to FEU, CGuserdirectory for user prof
well i've got current logged in user's username and group memberships showing on front end using the following from custom content module:
now, does anyone know how to display all other front end user properties?
specifically, how to use from custom content help page?
right now i used(left missing quotes referenced by dr.css in post below for reference purposes)
or 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.
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}
specifically, how to use
Code: Select all
$ccuser->property('propertyname')
right now i used
Code: Select all
{$ccuser->property(alt_email)}
or
Code: Select all
{$ccuser->property('ph')}
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.
Re: pass logged in uid to FEU, CGuserdirectory for user prof
Notice the missing ' ' in your call?...
Re: pass logged in uid to FEU, CGuserdirectory for user prof
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.
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.
Re: pass logged in uid to FEU, CGuserdirectory for user prof
Have you tried the {get_template_vars} tag, it should output all variables...
Re: pass logged in uid to FEU, CGuserdirectory for user prof
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.
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.