summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 01d144bf6..87afd06c4 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -214,7 +214,7 @@ function user_access($string) {
** To reduce the number of SQL queries, we cache the user's permissions
** in a static variable.
*/
-
+
if (isset($perm)) {
if ($user->uid) {
$perm = db_result(db_query("SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = '%s'", $user->role), 0);
@@ -289,7 +289,7 @@ function user_search($keys) {
$result = db_query_range("SELECT * FROM users WHERE name LIKE '%$keys%'", 0, 20);
while ($account = db_fetch_object($result)) {
- $find[$i++] = array("title" => $account->name, "link" => (strstr($_SERVER["PHP_SELF"], "admin") ? url("admin/user/edit/$account->uid") : url("user/view/$account->uid")), "user" => $account->name);
+ $find[$i++] = array("title" => $account->name, "link" => (strstr(request_uri(), "admin") ? url("admin/user/edit/$account->uid") : url("user/view/$account->uid")), "user" => $account->name);
}
return $find;
}