OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Redirect to index page after signout

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Redirect to index page after signout

Postby santillan » Wed May 08, 2013 4:54 am

Dear friends,

We would like to include a redirection to index page after signout in our OJS installation.

We thought that the point for change is: ... plugins/blocks/user/block.tpl

Code: Select all
      <ul>
         {if $hasOtherJournals}
            <li><a href="{url journal="index" page="user"}">{translate key="plugins.block.user.myJournals"}</a></li>
         {/if}
         <li><a href="{url page="user" op="profile"}">{translate key="plugins.block.user.myProfile"}</a></li>
         <li><a href="{url page="login" op="signOut"}">{translate key="plugins.block.user.logout"}</a></li>
         {if $userSession->getSessionVar('signedInAs')}
            <li><a href="{url page="login" op="signOutAsUser"}">{translate key="plugins.block.user.signOutAsUser"}</a></li>
         {/if}


We do not know what operator use. Can you help us with it?

Thanks in advanced for your time.
santillan
 
Posts: 34
Joined: Sun Oct 14, 2007 11:09 am
Location: Brasil

Re: Redirect to index page after signout

Postby asmecher » Wed May 08, 2013 8:20 am

Hi Santillian,

The best place to do this is in lib/pkp/pages/login/PKPLoginHandler.inc.php in the "signOut" function. The redirect that is sent to the user after a successful signout, in the case where a specific URL wasn't provided, comes from the line:
Code: Select all
$request->redirect(null, $request->getRequestedPage());
If you want the site-wide index page, you can use instead:
Code: Select all
$request->redirect('index', 'index');
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: Redirect to index page after signout

Postby santillan » Wed May 08, 2013 8:28 pm

Thanks Alec,

Your help was very useful :D
santillan
 
Posts: 34
Joined: Sun Oct 14, 2007 11:09 am
Location: Brasil


Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 3 guests