diff --git a/ext/image/main.php b/ext/image/main.php
index 941e7492..6867e2fd 100644
--- a/ext/image/main.php
+++ b/ext/image/main.php
@@ -116,11 +116,11 @@ class ImageIO extends Extension
public function onUserPageBuilding(UserPageBuildingEvent $event)
{
- $u_id = url_escape($event->display_user->id);
- $i_image_count = Image::count_images(["user_id={$event->display_user->id}"]);
+ $u_name = url_escape($event->display_user->name);
+ $i_image_count = Image::count_images(["user={$event->display_user->name}"]);
$i_days_old = ((time() - strtotime($event->display_user->join_date)) / 86400) + 1;
$h_image_rate = sprintf("%.1f", ($i_image_count / $i_days_old));
- $images_link = make_link("post/list/user_id=$u_id/1");
+ $images_link = make_link("post/list/user=$u_name/1");
$event->add_stats("Images uploaded: $i_image_count, $h_image_rate per day");
}
diff --git a/ext/numeric_score/main.php b/ext/numeric_score/main.php
index 88ac8879..db544a89 100644
--- a/ext/numeric_score/main.php
+++ b/ext/numeric_score/main.php
@@ -31,11 +31,11 @@ class NumericScore extends Extension
$this->theme->get_nuller($event->display_user);
}
- $u_id = url_escape($event->display_user->id);
- $n_up = Image::count_images(["upvoted_by_id={$event->display_user->id}"]);
- $link_up = make_link("post/list/upvoted_by_id=$u_id/1");
- $n_down = Image::count_images(["downvoted_by_id={$event->display_user->id}"]);
- $link_down = make_link("post/list/downvoted_by_id=$u_id/1");
+ $u_name = url_escape($event->display_user->name);
+ $n_up = Image::count_images(["upvoted_by={$event->display_user->name}"]);
+ $link_up = make_link("post/list/upvoted_by=$u_name/1");
+ $n_down = Image::count_images(["downvoted_by={$event->display_user->name}"]);
+ $link_down = make_link("post/list/downvoted_by=$u_name/1");
$event->add_stats("$n_up Upvotes / $n_down Downvotes");
}
diff --git a/ext/user/main.php b/ext/user/main.php
index 041fe975..9e319f33 100644
--- a/ext/user/main.php
+++ b/ext/user/main.php
@@ -33,7 +33,7 @@ class UserLinksColumn extends Column
}
public function display(array $row)
{
- return A(["href"=>make_link("post/list/user_id={$row['id']}/1")], "Posts");
+ return A(["href"=>make_link("post/list/user={$row['name']}/1")], "Posts");
}
}