From 66375a3c577a0fa0f64b9c35ca8ada90ddef6a37 Mon Sep 17 00:00:00 2001
From: Cristina Hanes <cristinawithout@705216.no-reply.drupal.org>
Date: Fri, 27 Jul 2012 14:59:13 -0700
Subject: [PATCH] Issue #1703214 by cristinawithout: Fixed user paths

---
 rename_admin_paths.module |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rename_admin_paths.module b/rename_admin_paths.module
index ccfc052..47c985d 100644
--- a/rename_admin_paths.module
+++ b/rename_admin_paths.module
@@ -72,8 +72,8 @@ function rename_admin_paths_url_outbound_alter(&$path, &$options, $original_path
     $rename_user_path_value = variable_get('rename_user_path_value', 'member');
 
     // Replace user in path
-    if (preg_match('|^user(?![^/])|', $path)) {
-      $path = urlencode($rename_user_path_value);
+    if (preg_match('|^user(?![^/])(.*)|', $path, $matches)) {
+      $path = urlencode($rename_user_path_value) . $matches[1];
     }
   }
 }
@@ -112,7 +112,7 @@ function rename_admin_paths_url_inbound_alter(&$path, $original_path, $path_lang
     }
 
     // Get back default user path
-    if (preg_match('|^' . urlencode($rename_user_path_value) . '(?![^/])|', $path)) {
+    if (preg_match('|^' . urlencode($rename_user_path_value) . '(?![^/])(.*)|', $path, $matches)) {
       $path = 'user'. $matches[1];
     }
 
-- 
1.7.5.4

