Direct logout link (not module button)

15 years 8 months ago #68985 by cursor
Hey CB-Team,

thanks again for great CB1.2. I haven't yet found any component that runs so stable and smoothly and is still RC!

I'm running Joomla! 1.5.4 and CB 1.2 RC2 and I want to add an Logout-Link in my Usermenu. Is that somehow possible?

I checked available links in the menu manager for CB but all I found is register which doesn't make that much sense in that situation.

I also tried [code:1]index.php?option=com_comprofiler&task=logout[/code:1] which I found somewhere in the forum - that logs me out, but unfortunately doesn't redirect me (like to module logout button) and only gives me error "_UE_REGISTERFORPROFILE".

Do you have any ideas how I could achieve that I get logged out and redirected to the homepage (like the module does?)

Kind regards and thanks in advance.
Oli

Please Log in to join the conversation.

15 years 8 months ago #69045 by Rapunzl
Replied by Rapunzl on topic Re:Direct logout link (not module button)
Add an External Link with the code you sited as the URL:
index.php?option=com_comprofiler&task=logout

It works, but you'll have to modify the internal code in module/cblogin or more likely components/comprofiler to redirect to the front page instead of the profile error. The logout works though.

Post edited by: Rapunzl, at: 2008/07/23 00:47

Jamie (Rapunzl)
Community Builder Team Member

Before posting on forums: Read all CB Articles | Specially the FAQ | Help us help you
CB links: Subscribe to CB documentation | [url=http://www.joomlapolis.com/content/view/7363/37/
]Our templates[/url] | [url=http://www.joomlapolis.com/content/blogcategory/61/74/
]Paid Subscriptions[/url] | Get Hosting | Our Forge
Visit my CB Profile

My personal site Rapunzl's Reality always under reconstruction

Please Log in to join the conversation.

15 years 8 months ago #69085 by rpitera
Replied by rpitera on topic Re:Direct logout link (not module button)
Rapunzl wrote:

Add an External Link with the code you sited as the URL:
index.php?option=com_comprofiler&task=logout

It works, but you'll have to modify the internal code in module/cblogin or more likely components/comprofiler to redirect to the front page instead of the profile error. The logout works though.

Post edited by: Rapunzl, at: 2008/07/23 00:47


I think the code is in comprofiler around line 163 (but you'll want to doublecheck this with one of the core coders):

[code:1] }

if ( $return ) {
cbRedirect( strncasecmp( $return, "index.php", 9 ) ? cbSef( $return, false ) : $return );
} else {
cbRedirect( cbSef( 'index.php', false ) );
}[/code:1]

Post edited by: rpitera, at: 2008/07/23 14:04

Please Log in to join the conversation.

15 years 8 months ago #69126 by beat
I don't think there is a direct link for logout in CB yet (good idea).

You can use joomla's one (just the CB events won't be made, which isn't an issue in most cases).

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 7 months ago #70014 by isyan
Replied by isyan on topic Re:Direct logout link (not module button)
can you please show me how to use the log out module of joomla which directly logs the use out when clicked?

thanks again..

Please Log in to join the conversation.

15 years 7 months ago #70044 by rpitera
Replied by rpitera on topic Re:Direct logout link (not module button)
There should already be one in your User Menu. If not, simply make a component link to the login component and name it "Logout".

If the user is already logged in this should log him or her out.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.282 seconds

Facebook Twitter LinkedIn