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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

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: 10015
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: Google [Bot] and 2 guests