Please upgrade here. These earlier versions are no longer being updated and have security issues.

Sign Out Redirect

Vanilla newbie. How do I create a Sign Out Redirect? Instead of remaining on the forum page with a Sign In menu, I want to redirect to the site home page.

«13456712

Comments

  • businessdadbusinessdad Stealth contributor MVP

    In configuration file, set the following:

    $Configuration['Garden']['Authenticator']['SignOutUrl'] = '/entry/signout/{Session_TransientKey}?Target=<destination url>';
    

    Replace <destination url> with the URL where you would like to redirect the user, and you should be ready to go.

    peregrinehgtonightvrijvlinder
  • peregrineperegrine MVP
    edited April 2014

    @businessdad said:
    In configuration file, set the following:

    $Configuration['Garden']['Authenticator']['SignOutUrl'] = '/entry/signout/{Session_TransientKey}?Target=<destination url>';
    

    Replace <destination url> with the URL where you would like to redirect the user, and you should be ready to go.

    shazam.

    I knew their was a reason, I wasn't going to field this answer. I would have made the answer much more difficult and complex then this simple change you provided bd

    configuration statements and definitions - they make forum modification life so much easier.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • businessdadbusinessdad Stealth contributor MVP

    That's true, it's just that some of them look more like Easter eggs, because they are not obvious. One thing that surprised me was the absence of a session lifespan setting, so I implemented it in my AFC plugin. Some settings are hidden, some just are not there :D

  • peregrineperegrine MVP
    edited April 2014

    That's true, it's just that some of them look more like Easter eggs,

    maybe we need to have an easter egg hunt, previously unknown and esoteric config statments.
    but then again we already did, and nobody went on the hunt. Then, of course the person who found the most easter eggs previously unmentioned would get the egg-hunter badge. stay tuned for a response from v. :)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
  • Uh..remember I said "newbie." Where's the config file?

  • Found the config file. Added the code at end of //Garden. Did not work for me? Any advice.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    please post you config but remove or modify the password user id and any secret number pertaining to private info about the forum before you post it.

    Are you using rewrite Url ? is your htaccess configured properly, what errors are you getting? 404 500 ?

    Make sure you entered the url properly in that line.

    I thought I had collected all the secret configs they have and more keep appearing. Thanks for this new one :)

    businessdadperegrine
  • rmeilechrmeilech
    edited April 2014

    Per your request.
    I am not getting any errors.
    When I click SignOut, it simply exits normally--but to the Forum home page, not to the site home page http://www.torahrx.com.
    I tried several variations of the Target= e.g., with and without "", etc. None of them worked.
    Rewrite URL does seem to be set to True.
    I am not sure what should be configured in htaccess, so I can't answer that question.
    Thank you for your help.

    Here is conf/config.php.

    <?php if (!defined('APPLICATION')) exit();
    
    // Conversations
    $Configuration['Conversations']['Version'] = '2.0.18.10';
    
    // Database
    $Configuration['Database']['Name'] = xxxx';
    $Configuration['Database']['Host'] = 'localhost';
    $Configuration['Database']['User'] = 'xxxx';
    $Configuration['Database']['Password'] = 'xxxx';
    
    // EnabledApplications
    $Configuration['EnabledApplications']['Conversations'] = 'conversations';
    $Configuration['EnabledApplications']['Vanilla'] = 'vanilla';
    
    // EnabledPlugins
    $Configuration['EnabledPlugins']['GettingStarted'] = 'GettingStarted';
    $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    
    // Garden
    $Configuration['Garden']['Title'] = 'TorahRX Forums';
    $Configuration['Garden']['Cookie']['Salt'] = 'nzy7sufj';
    $Configuration['Garden']['Cookie']['Domain'] = '';
    $Configuration['Garden']['Registration']['ConfirmEmail'] = '1';
    $Configuration['Garden']['Registration']['Method'] = 'Captcha';
    $Configuration['Garden']['Registration']['ConfirmEmailRole'] = '3';
    $Configuration['Garden']['Registration']['CaptchaPrivateKey'] = 'xxxxx';
    $Configuration['Garden']['Registration']['CaptchaPublicKey'] = 'xxxxx';
    $Configuration['Garden']['Registration']['InviteExpiration'] = '-1 week';
    $Configuration['Garden']['Registration']['InviteRoles'] = 'a:5:{i:3;s:1:"0";i:4;s:1:"0";i:8;s:1:"0";i:32;s:1:"0";i:16;s:1:"0";}';
    $Configuration['Garden']['Email']['SupportName'] = 'TorahRX Forums';
    $Configuration['Garden']['Email']['SupportAddress'] = '[email protected]';
    $Configuration['Garden']['Email']['UseSmtp'] = FALSE;
    $Configuration['Garden']['Email']['SmtpHost'] = '';
    $Configuration['Garden']['Email']['SmtpUser'] = '';
    $Configuration['Garden']['Email']['SmtpPassword'] = '';
    $Configuration['Garden']['Email']['SmtpPort'] = '25';
    $Configuration['Garden']['Email']['SmtpSecurity'] = '';
    $Configuration['Garden']['Version'] = '2.0.18.10';
    $Configuration['Garden']['RewriteUrls'] = TRUE;
    $Configuration['Garden']['CanProcessImages'] = TRUE;
    $Configuration['Garden']['Installed'] = TRUE;
    $Configuration['Garden']['Logo'] = 'PU82UW2Q4QPJ.png';
    $Configuration['Garden']['InstallationID'] = 'xxxxx';
    $Configuration['Garden']['InstallationSecret'] = 'xxxxx';
    $Configuration['Garden']['Theme'] = 'torahrx';
    $Configuration['Garden']['Authenticator']['SignOutUrl'] = '/entry/signout/{Session_TransientKey}?Target="http://www.TorahRX.com"';
    
    // Modules
    $Configuration['Modules']['Vanilla']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';
    $Configuration['Modules']['Conversations']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';
    
    // Plugins
    $Configuration['Plugins']['GettingStarted']['Dashboard'] = '1';
    $Configuration['Plugins']['GettingStarted']['Categories'] = '1';
    $Configuration['Plugins']['GettingStarted']['Registration'] = '1';
    
    // Routes
    $Configuration['Routes']['DefaultController'] = 'a:2:{i:0;s:14:"categories/all";i:1;s:8:"Internal";}';
    
    // Vanilla
    $Configuration['Vanilla']['Version'] = '2.0.18.10';
    $Configuration['Vanilla']['Categories']['MaxDisplayDepth'] = '3';
    $Configuration['Vanilla']['Categories']['DoHeadings'] = FALSE;
    $Configuration['Vanilla']['Categories']['HideModule'] = FALSE;
    
    // Last edited by rmeilech (172.250.113.209)2014-04-11 12:02:37
    
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    Did you try it like this? keep track of the '' in your example you have three at the end of the url I think it has to be enclosed or written different ...

    edited coz Bdad gave the correct answer

  • businessdad:
    I did try it previously without the "quotes". That didn't work. I do not know what URL-encoded is. I did try it just now with the code you supplied (copied and pasted to config.php). It is still not working for me.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    url encoded is when parts of the url like the symbols :// are replaced with other symbols and numbers.

    http://www.w3schools.com/tags/ref_urlencode.asp

  • Yep. After I sent my reply, I checked it out. I now understand. Unfortunately, the redirect is still not working.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    I think I understand why it will not work, I added this to my config but put my website url this is what the link looks like and it throws a 404 because it thinks we are still in the forum but my main site is an outside link to the forum.

    http://www.vrijvlinder.com/forum/entry/signout/editedtransientkeyout?Target=http0.0000000.000000www.vrijvlinder.com

    when I add the url without encoding the url looks good but it keeps the entry/signout part and adds it to the link you add for redirect as bellow. So it throws a 404

    http://www.vrijvlinder.com/entry/signout/editedtransientkeyout?Target=http://www.vrijvlinder.com

    I think redirects can only be made to internal links because I added this bellow and it redirected just fine.

    http://www.vrijvlinder.com/forum/entry/signout/editedtransientkeyout?Target=/gallery

  • Cool 404. But I am getting an error. It simply redirects to the regular Sign In page. It is as if system isn't even seeing the config file.

  • That should be I an NOT getting an error.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Try to use an internal link as a redirect try the bellow, it should redirect to the home page of the forum

    $Configuration['Garden']['Authenticator']['SignOutUrl'] = '/entry/signout/{Session_TransientKey}?Target=/';

  • Sorry, I am not understanding. It is currently redirecting to the home page of the forum. I want it to redirect to the home page of the entire site.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2014

    ok try another forum page like /categories/all

    or /activity

    The idea is to test if it is redirecting. You will not be able to redirect to an outside of the forum link. Using this configuration it is not possible to redirect logouts to outside urls.

    To be able to do that you will need to modify the htaccess file and add a redirect there. I am not sure how to do that maybe @x00 has an idea.

  • Oh, why didn't somebody say that in the first place. :) But that's what I want to do--redirect to outside the forum. Is there a way to do that?

Sign In or Register to comment.