The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 44 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Jun 13, 2009 7:30 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10766
Location: Ireland
You can use the mod_login module for that though.

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Last edited by ooffick on Sat Jun 13, 2009 8:04 pm, edited 1 time in total.
Edit: It is possible to use the logout without a token


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 7:39 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 85
OK. Thank you


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 8:02 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10766
Location: Ireland
Actually sorry, you can do logout without a token:

Did you try this one as normal external address:
index.php?option=com_user&return=Lw&task=logout

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 9:03 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 85
ooffick wrote:
Actually sorry, you can do logout without a token:

Did you try this one as normal external address:
index.php?option=com_user&return=Lw&task=logout

Olaf


Perfect. Works like a charm. Thnx


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 9:04 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 85
One more. Do you know how I can hide the virtuemart login box, after the user is logged in?


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 9:13 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10766
Location: Ireland
You could use the Extension MetaMod to do that.

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 9:26 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 85
I use rockaccess, dont know if I can use MetaMod too or do I get a conflict? But how do I use it then?


Top
 Profile  
 
PostPosted: Sat Jun 13, 2009 10:42 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Jul 17, 2008 3:10 pm
Posts: 10766
Location: Ireland
Well, as far as I know rokaccess is a content plugin.

If you want to hide a module (when you logged in) you would need to use e.g. MetaMod. Add it instead of the module you want to hide and then add into the parameters of that module:
Code:
if ( MM_NOT_LOGGED_IN ) return 44; else return 45;


44 = Module ID of the Module which you want to display when the user is logged in
45 = Module ID of the Module which you want to display when the user is logged out

Olaf

_________________
Olaf Offick - Global Moderator
http://learnskills.org


Top
 Profile  
 
PostPosted: Sun Jun 14, 2009 12:30 am 
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 85
Awesome. It works. Can't believe it. It works.

Thank you.


Top
 Profile  
 
PostPosted: Tue Jun 16, 2009 1:03 pm 
User avatar
Joomla! Ace
Joomla! Ace

Joined: Tue Dec 25, 2007 2:15 pm
Posts: 1075
Location: Baroda - India
use module instead of menu link... you can achieve it that way..

_________________
ONE WORLD OPEN WORLD - WAR TODAY GIVE PEACE A CHANCE
http://indiavoice.info - India News & Information Portal
http://indiadaily.indiavoice.info - India Daily Infotainment

(Powered by Joomla!)


Top
 Profile  
 
PostPosted: Tue Jun 16, 2009 1:52 pm 
Joomla! Intern
Joomla! Intern

Joined: Thu Aug 09, 2007 2:08 pm
Posts: 85
I did. Thnx


Top
 Profile  
 
PostPosted: Fri Oct 09, 2009 8:12 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Apr 24, 2008 1:06 pm
Posts: 2
Hello,
Guys this solution is exactly the thing I was looking for.
It saves one click for the user by not showing the logout link as a part of module in the content but by logging out directly.
It is in my opinion smoother way of logout. More user firendly.

Thanks for sharing your knowledge...
:)
Regards,
Dariusz


Last edited by ooffick on Fri Oct 09, 2009 9:05 am, edited 1 time in total.
Mod Note: Deleted Manual Signature. Please read the Forum Rules for details


Top
 Profile  
 
PostPosted: Tue Mar 23, 2010 4:46 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Mar 23, 2010 4:32 pm
Posts: 1
Sorry to dig up such an old post, but Olaf is my hero. Exactly what I was looking for. Thanks much!

ooffick wrote:
Can you try this one:

Code:
index.php?option=com_user&task=logout&return=aW5kZXgucGhw


Do you have access to your error log file? to see if there are any errors? Do you have PHP4 or PHP5?

Olaf


Top
 Profile  
 
PostPosted: Tue Apr 27, 2010 6:57 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Apr 27, 2010 6:53 pm
Posts: 2
Just a quick snippet for anybody who runs across this post. This link will redirect the user to whichever page they are currently on after they are logged out.

Code:
<?php

// get the user object
$user = &JFactory::getUser();

// get the current Joomla base url
$base = JURI::current();

// encode the current base url for use in redirection
$redirect = base64_encode($base);

/* is the user logged in? if user is logged in,
display Log Out link with redirection to
current page */

if ($user->get('gid')) { ?>

<a href="index.php?option=com_user&task=logout&return=<?php echo $redirect; ?>">Log Out</a>

<?php } ?>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 44 posts ]  Go to page Previous  1, 2



Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group