diff --git a/e107_core/url/user/rewrite_url.php b/e107_core/url/user/rewrite_url.php index 52aa4b006..c0de27a51 100644 --- a/e107_core/url/user/rewrite_url.php +++ b/e107_core/url/user/rewrite_url.php @@ -34,19 +34,19 @@ class core_user_rewrite_url extends eUrlConfig 'rules' => array( // simple matches first - PERFORMANCE '' => array('myprofile/view', 'defaultVars' => array('id' => 0)), - 'Settings' => array('myprofile/edit', 'defaultVars' => array('id' => 0), 'legacy' => '{e_BASE}usersettings.php'), - 'List' => array('profile/list', 'allowVars' => array('page'), 'legacyQuery' => '{page}'), - 'Login' => array('login/index', 'legacy' => '{e_BASE}login.php'), - 'Register' => array('register/index', 'legacy' => '{e_BASE}signup.php'), + 'settings' => array('myprofile/edit', 'defaultVars' => array('id' => 0), 'legacy' => '{e_BASE}usersettings.php'), + 'list' => array('profile/list', 'allowVars' => array('page'), 'legacyQuery' => '{page}'), + 'login' => array('login/index', 'legacy' => '{e_BASE}login.php'), + 'register' => array('register/index', 'legacy' => '{e_BASE}signup.php'), // Regex involved next //'' => array('profile/view', 'legacyQuery' => 'id.{id}'), - 'Edit/' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}'), + 'edit/' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}'), // Named requests - important to be in the end in this order! - 'Edit/' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}', 'parseCallback' => 'idByName'), + 'edit/' => array('profile/edit', 'legacy' => '{e_BASE}usersettings.php', 'legacyQuery' => '{id}', 'parseCallback' => 'idByName'), // Last one - close to catch all! - '' => array('profile/view', 'legacyQuery' => 'id.{id}', 'parseCallback' => 'idByName'), + '' => array('profile/view', 'legacyQuery' => 'id.{id}', 'parseCallback' => 'idByName'), ) ); } diff --git a/usersettings.php b/usersettings.php index 9ee606015..6a3ed7531 100644 --- a/usersettings.php +++ b/usersettings.php @@ -21,7 +21,7 @@ Admin log events: USET_01 - admin changed user data */ -if(preg_match('/^\/(.*?)\/(usersettings\.php|user\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI'], $_usersettings_matches)) +if(preg_match('/^\/(.*?)\/(usersettings\.php|\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI'], $_usersettings_matches)) { $eplug_admin = TRUE; }