User profiles enabled, how do they sign out?
Permalink
Hey, I am setting up a website for a client and I set up member profiles but when I sign in as one of the dummy accounts I dont see any options to sign out. I searched the forum but I couldn't find anything.
Your help is much appreciated. Thanks
Your help is much appreciated. Thanks
I think you would just need to create a link that directs to:http://www.yoursite.com/login/-/logout...
There is no good option for it.
The best way at the moment is to add a link on a page (home or login/logout) which links to site.com/index.php/login/-/logout
make it a block with permissions set so only registered users can view it, that way people only see it when they are logged in.
The best way at the moment is to add a link on a page (home or login/logout) which links to site.com/index.php/login/-/logout
make it a block with permissions set so only registered users can view it, that way people only see it when they are logged in.
Thanks for the quick replies! I appreciate both of your answers and so quick too!
I just ran into another problem. I hard coded the login page and the register page and when I set the permissions so that registered users cant see the page the link stays because it is hard coded.
Maybe their is a way to add them into the autonav? When I searched for it, I eventually ran into the solution of hard coding them in.
I just ran into another problem. I hard coded the login page and the register page and when I set the permissions so that registered users cant see the page the link stays because it is hard coded.
Maybe their is a way to add them into the autonav? When I searched for it, I eventually ran into the solution of hard coding them in.
also you can use the login block, once logged in it has a logout button
Thanks garynobles! I think I may have to go with this option.
Since when? Did they update it since I use the login block and all it has it login, after loging in it still has only login
I tried the login block and it appears to still be version 1, but I did see some fixes for it around the forum. I haven't tried them though but hard coding the links in works fine.
I just need to learn how to only show the links when signed in and when signed out. I would really appreciate if someone can help me. I just started learning php and understand if elseif and else but I dont exactly know what I should be writing. lol
If someone chimes in that would be awesome but if not when I figure it out I will update.
Thanks
I just need to learn how to only show the links when signed in and when signed out. I would really appreciate if someone can help me. I just started learning php and understand if elseif and else but I dont exactly know what I should be writing. lol
If someone chimes in that would be awesome but if not when I figure it out I will update.
Thanks
Here's the code that fixed my situation.
$u = new User();
?>
<?php
if ($u->checkLogin()){ ?>
<li><a href="<?php {echo View::url('/login/logout');} ?>" title="Log Out">Log Out</a></li>
<?php
}else{
?>
<li><a href="<?php echo View::url('/login');?>" title="Login to the site">Login</a></li>
<li><a href="<?php echo View::url('/register');?>" title="Register">Register</a></li>
<?php
}
?>
Enjoy!!
$u = new User();
?>
<?php
if ($u->checkLogin()){ ?>
<li><a href="<?php {echo View::url('/login/logout');} ?>" title="Log Out">Log Out</a></li>
<?php
}else{
?>
<li><a href="<?php echo View::url('/login');?>" title="Login to the site">Login</a></li>
<li><a href="<?php echo View::url('/register');?>" title="Register">Register</a></li>
<?php
}
?>
Enjoy!!
This way is simple, easy and absolutely works as stated below by a few other helpful users.
I simply created a content block with a link called "Logout" and linked it tohttp://www.mysite.com/index.php/login/-/logout...
Done
I simply created a content block with a link called "Logout" and linked it tohttp://www.mysite.com/index.php/login/-/logout...
Done