Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Create a signout url?

edited February 2010 in Vanilla 2.0 - 2.8
I am working on a mobile style, and am going to completely redoing the menu, and I would like to pull the sign out button out of it, and put it in a different location. I have been able to do that with the sign in button, but not for the sign out. I am using iWebKit, and since I am not experienced with PHP I don't know what I am doing. I've managed to change the button from Sign In to Sign Out by checking the session. My problem is being able to produce a authenticated URL to sign out.

Here is the code for my sign button:
<a class='SignInPopup' href='/index.php/entry/?Target=discussions'>Sign In</a></div>
That was pretty easy, but how do I get the user to be able to sign out from my button? I think I have to use this:
$Authenticator->SignOutUrl()
Any help would be greatly appreciated.

Comments

  • Yep, that's pretty much it.

    SignOutUrl(); ?>">Sign Out
  • I understand that's how it's done, but I also know that's PHP and I am new to all that, so my real question is how do I throw that in the link?
    <a href="???">Sign Out</a>
    What do I put where the ??? is? It's already in a PHP statement, if that helps.
  • Can anyone help me with this?
  • lucluc ✭✭
    edited February 2010
    A simple grep would have gave you the info in less than 2 minutes :
    luc@cadsuane:~/dev/lussumo/Garden$ grep -i "sign out" */*/*/*

    applications/garden/views/admin.master.php: echo Anchor(Gdn::Translate('Sign Out'), str_replace('{Session_TransientKey}', $Session->TransientKey(), $Authenticator->SignOutUrl()));

    applications/garden/views/default.master.php: $this->Menu->AddLink('SignOut', Gdn::Translate('Sign Out'), $Authenticator->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
  • I'm sorry, but that doesn't make any sense to me :/
  • edited February 2010
    You can do something like this. ;)
    Just do a echo in PHP.
    link
Sign In or Register to comment.