Customisation help please - Make logout jump to login

boff

Joined: 2004-07-16
Posts: 3
Posted: Wed, 2004-09-29 16:22

Hi all,
I was wondering if anyone could help me with making it in G2 so that when you click logout the next page that loads is the login page.
This is just to make the 'feel' of my site a bit neater.
Many thanks in advance,
Julian Luton

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-09-29 17:31

modules/core/Logout.inc
you'll see the redirect view.. change it to core:UserAdmin and add
$results['redirect']['subView'] = 'core:UserLogin';

 
boff

Joined: 2004-07-16
Posts: 3
Posted: Thu, 2004-09-30 13:29

cool - thanks

 
leeman

Joined: 2005-03-19
Posts: 22
Posted: Tue, 2005-04-26 12:29

What do I add if I want to redirect the ppl to a totaly diffrent page after logout ???

Like to my websites portal ...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-04-26 14:21

instead of setting 'view' and 'subView' for the 'redirect' in Logout.inc you can set $results['redirect']['href'] to any url you want.

 
leeman

Joined: 2005-03-19
Posts: 22
Posted: Tue, 2005-04-26 16:14

Thanx ...

Exactly what I wanted .... :)

 
ihstiv

Joined: 2006-12-30
Posts: 13
Posted: Mon, 2007-09-03 18:04

Hi Guys,
It looks like the file: modules/core/Logout.inc - has changed a bit w/ the 2.2.3 release - could you let me know what the steps are to redirect to login upon logout w/ the latest release?

Thanks in advance.

 
ihstiv

Joined: 2006-12-30
Posts: 13
Posted: Mon, 2007-09-03 18:34

I found a solution that works for this - not sure if it's the best, but it works..

if (!isset($results['return'])
&& !isset($results['redirect'])
&& !isset($results['delegate'])) {
/* $results['redirect']['view'] = GALLERY_DEFAULT_VIEW;*/
$results['redirect']['href'] = 'main.php?g2_view=core.UserAdmin&g2_subView=core.UserLogin';
}