Browse Source

The user.php?admin file redirects to web/user/admin in order to view user profiles

Julio Montoya 12 years ago
parent
commit
3c2a4d2c7d
1 changed files with 11 additions and 0 deletions
  1. 11 0
      user.php

+ 11 - 0
user.php

@@ -0,0 +1,11 @@
+<?php
+//Temporal hack to redirect calls to the new web/index.php
+require_once 'main/inc/global.inc.php';
+$path = api_get_path(WEB_PUBLIC_PATH);
+$array_keys = isset($_GET) ? array_keys($_GET) : null;
+
+if (!empty($array_keys)) {
+    $username 	= Security::remove_XSS(substr($array_keys[0], 0, 100)); // max len of an username
+    header('Location: '.$path.'user/'.$username);
+}
+exit;