I've implemented the FEU and SelfRegistration modules.
Is there a way to display the Name (not username) of a logged in user (say for instance below a search box to the top right?).
I would also like to display a link to change user settings, logout etc.
Thanks for the help
Dewald
[SOLVED] FEU name display below search box
[SOLVED] FEU name display below search box
Last edited by ACDS on Tue Mar 06, 2012 9:09 pm, edited 1 time in total.
Re: FEU name display below search box
Use CustomContent module, you will have smarty variable $ccuser:
Marek A.
$ccuser->property('propertyname') - outputs the value of the property for the currently logged in user.
Marek A.
Re: FEU name display below search box
That's not even necessary, just {$propertyname} will do.
Use <pre>{get_template_vars}</pre> to display all variables that you can use on your page.
Use <pre>{get_template_vars}</pre> to display all variables that you can use on your page.
Re: FEU name display below search box
Thanks for the help. Now a follow-up question. How can I get a "Sign out" link just below my username? I tried the FEU sign out form but I do not want the message to display and then the link. I only want a link on the "sign out" text?
Thanks
dewald
Thanks
dewald
Re: FEU name display below search box
Customize the sign out template...
Re: FEU name display below search box
Oh my word I'm daft! Thank you!!
So just for the benefit of others as thick as I am. I got everything working and this is what I did:
In my template I used the following code to display a logged in username, the "Change user settings" and a link to the logout template which you can find in FEU.
The FEU logout template I edited so that only a link to the default text: "Sign out" is created:
From the code above you will see the {cms_selflink page="change-user-setting" text="Change user settings"} is a link to a content page on which I have included the smarty: {FrontEndUsers form="changesettings"}
There might be an easier way of doing this, but I found that I cannot just include the smarty {FrontEndUsers form="changesetting"} in the Template as this throws out the whole formatting of my page (no idea why this is happening but anyway!)
I hope this helps someone...it does the job on my side.
Thanks for the help in the right direction!!
Dewald
So just for the benefit of others as thick as I am. I got everything working and this is what I did:
In my template I used the following code to display a logged in username, the "Change user settings" and a link to the logout template which you can find in FEU.
Code: Select all
<div align=right>
{if $ccuser->loggedin()}
<b>Logged in as:</b><br/>{$customcontent_loginname}<br/>
{cms_selflink page="change-user-setting" text="Change user settings"}
{FrontEndUsers form="logout"}
{else}
<b>Not logged in</b><br/>
{cms_selflink page="login" text="Login"}
{/if}
</div>
Code: Select all
<!-- Logout form template -->
<p><a href="{$url_logout}" title="{$mod->Lang('info_logout')}">{$mod->Lang('logout')}</a></p>
<!-- Logout form template -->
There might be an easier way of doing this, but I found that I cannot just include the smarty {FrontEndUsers form="changesetting"} in the Template as this throws out the whole formatting of my page (no idea why this is happening but anyway!)
I hope this helps someone...it does the job on my side.
Thanks for the help in the right direction!!
Dewald