Jelajahi Sumber

Fixed redirect after login

Moritz Schmidt 10 tahun lalu
induk
melakukan
6f39f1454d
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 2 1
      includes/config.inc.php.dist
  2. 1 1
      includes/user.inc.php

+ 2 - 1
includes/config.inc.php.dist

@@ -5,7 +5,8 @@ $CONFIG = array(
 	"dbUser"		=>		"user", // Database Username
 	"dbPassword"	=>		"password", // Database Password
 	"dbDatabase"	=>		"atoffice", // Database name
-	"documentPath"	=> 		"/path/to/documents/" // Absolute path to documents folder WITH ending slash
+	"documentPath"	=> 		"/path/to/documents/", // Absolute path to documents folder WITH ending slash
+	"url"			=>		"http://office.tld"
 );
 
 ?>

+ 1 - 1
includes/user.inc.php

@@ -50,7 +50,7 @@ Class User {
 			$_SESSION['loggedIn'] = true;
 			$_SESSION['username'] = $this->username;
 			$this->loggedIn = true;
-			header("Location: http://atoffice");
+			header("Location: " . $CONFIG['url']);
 		} else {
 			return false;
 		}