• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

After Log-out Redirection

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))

Chris D

XenForo developer
Staff member
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:


Lines 12-15 read:

		$redirectResponse = $this->responseRedirect(
			$this->getDynamicRedirect(false, false)
Change them to:

		$redirectResponse = $this->responseRedirect(
			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.