Add UserCake
[matches/MCTX3420.git] / testing / MCTXWeb / public_html / users / logout.php
diff --git a/testing/MCTXWeb/public_html/users/logout.php b/testing/MCTXWeb/public_html/users/logout.php
new file mode 100644 (file)
index 0000000..728a294
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+/*\r
+UserCake Version: 2.0.2\r
+http://usercake.com\r
+*/\r
+\r
+require_once("models/config.php");\r
+if (!securePage($_SERVER['PHP_SELF'])){die();}\r
+\r
+//Log the user out\r
+if(isUserLoggedIn())\r
+{\r
+       $loggedInUser->userLogOut();\r
+}\r
+\r
+if(!empty($websiteUrl)) \r
+{\r
+       $add_http = "";\r
+       \r
+       if(strpos($websiteUrl,"http://") === false)\r
+       {\r
+               $add_http = "http://";\r
+       }\r
+       \r
+       header("Location: ".$add_http.$websiteUrl);\r
+       die();\r
+}\r
+else\r
+{\r
+       header("Location: http://".$_SERVER['HTTP_HOST']);\r
+       die();\r
+}      \r
+\r
+?>\r
+\r

UCC git Repository :: git.ucc.asn.au