Create a logout button in Joomla 1.5
Jun27Difficulty: 




In Joomla 1.5, you need to press the logout button within the login component, to log off your session.
This logic doesn’t seem very clear for me. If I want to log-off I don’t want 2 page clicks/refreshes.
To create a logout button or menu link, you just need to invoke the logout URL part:
index.php?option=com_user&task=logout&return=Lw==
Or incase when you have Search Engine Friendly (SEF) URL’s:
/logout.html?return=Lw
Now did you note, the return=Lw== parameter?
This parameter is for bringing you back to the return page, after logging out.
The “Lw==”-value, is a Base64 encoding for “/” which brings you back to the root of the page.
Say that you don’t want to forward to the root, but to the ‘/goodbye/index.html’ page?
You will need the Base64 encoding of this string:
/logout.html?return=L2dvb2RieWUvaW5kZXguaHRtbA==
Well, here’s your help, I found a nice online Base64 converter, which does this job for you.
Check out my website to see it working in a Joomla 1.5 page.
Posted in encoding, joomla, opensource |Base64, / converter, / encoding, / Joomla 1.5, / logout
» 9 Comments, post your comment now. »
9 Responses to “Create a logout button in Joomla 1.5”
ta, that was exactly what i was looking for, thanks
Lee, thanks for your information about how to create a Joomla logout button. Your method works perfectly – unlike some other posts that I read before I found yours. Thank- you very much!
hi.
thanks a lot.. I was looking for it.. great stuff
Thx ALOT!
Thanks, but when I logout using this code I get
Username and password do not match or you do not have an account yet
I think this message must be coming from the backend?Any help would be appreciated.
Mika
thank you for explanation … just what I was looking for
![]()
thank you! simple, works, added as external link to the top menu
It doesn’t work, it gets me to opendns and the redirect link is correct. help!!!!!!