Ver Fonte

logout location is configurable

Useful for installations where you want to "cascade" logout to a central
authentication system
boyska há 5 anos atrás
pai
commit
6e6acabbfb
2 ficheiros alterados com 9 adições e 1 exclusões
  1. 5 1
      classes/handler/public.php
  2. 4 0
      config.php-dist

+ 5 - 1
classes/handler/public.php

@@ -263,7 +263,11 @@ class Handler_Public extends Handler {
 
 	function logout() {
 		logout_user();
-		header("Location: index.php");
+		$location = 'index.php';
+		if(defined('LOGOUT_LOCATION')) {
+			$location = LOGOUT_LOCATION;
+		}
+		header("Location: $location");
 	}
 
 	function share() {

+ 4 - 0
config.php-dist

@@ -90,6 +90,10 @@
 	// If set to true, users won't be able to set application language
 	// and settings profile.
 
+    define ('LOGIN_LOCATION', 'index.php');
+    // When a user logs out, redirect to this location. This is useful when you have some central
+    // authentication system, and you want to reach the main logout page
+
 	// *********************
 	// *** Feed settings ***
 	// *********************