After Log-out Redirection

Galexrt

Member
Hi
Where can i change where a user should get to after he logged out?
(I mean if user A logs out then he get redirected to the portal site(something like this))
 
It's not an easy thing to change.

You would either need to write an add-on to extend the Logout controller or it requires a code edit.

Obviously code edits aren't great as you would need to re-apply them after XenForo upgrades.

However, this change is quite minor... if you want to do it, here's how:

Open the following file in Notepad or other editor:

library/XenForo/ControllerPublic/Logout.php

Lines 12-15 read:

PHP:
		$redirectResponse = $this->responseRedirect(
			XenForo_ControllerResponse_Redirect::SUCCESS,
			$this->getDynamicRedirect(false, false)
		);

Change them to:

PHP:
		$redirectResponse = $this->responseRedirect(
			XenForo_ControllerResponse_Redirect::SUCCESS,
			XenForo_Link::buildBasicLink('http://www.google.co.uk', '');
		);

Note that this is redirecting to Google, but that is just as an example. In that format, you can literally redirect to any URL you like.
 
Top Bottom