Skip to content

Node.js based forum software built for the modern web

fix: sortby

Barış Soner Uşaklı7bddec93ec7e
diff --git a/src/controllers/admin/users.js b/src/controllers/admin/users.js
index 26edf7a001..3acd0cd808 100644
--- a/src/controllers/admin/users.js
+++ b/src/controllers/admin/users.js
@@ -64,7 +64,7 @@ async function getUsers(req, res) {
}
if (!set.length) {
set.push('users:online');
- sortBy = 'online';
+ sortBy = 'lastonline';
}
return set.length > 1 ? set : set[0];
}
diff --git a/src/views/admin/manage/users.tpl b/src/views/admin/manage/users.tpl
index 0578299721..bf15116473 100644
--- a/src/views/admin/manage/users.tpl
+++ b/src/views/admin/manage/users.tpl
@@ -98,7 +98,7 @@
<th data-sort="reputation" class="text-right pointer">[[admin/manage/users:users.reputation]] {{{if sort_reputation}}}<i class="fa fa-sort-{{{if reverse}}}down{{{else}}}up{{{end}}}">{{{end}}}</th>
<th data-sort="flags" class="text-right pointer">[[admin/manage/users:users.flags]] {{{if sort_flags}}}<i class="fa fa-sort-{{{if reverse}}}down{{{else}}}up{{{end}}}">{{{end}}}</th>
<th data-sort="joindate" class="pointer">[[admin/manage/users:users.joined]] {{{if sort_joindate}}}<i class="fa fa-sort-{{{if reverse}}}down{{{else}}}up{{{end}}}">{{{end}}}</th>
- <th data-sort="lastonline" class="pointer">[[admin/manage/users:users.last-online]] {{{if sort_online}}}<i class="fa fa-sort-{{{if reverse}}}down{{{else}}}up{{{end}}}">{{{end}}}</th>
+ <th data-sort="lastonline" class="pointer">[[admin/manage/users:users.last-online]] {{{if sort_lastonline}}}<i class="fa fa-sort-{{{if reverse}}}down{{{else}}}up{{{end}}}">{{{end}}}</th>
</tr>
</thead>
<tbody>