mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
delete user button in admin/users. the latest/top posters and most reputation sorting is working now in admin/users
This commit is contained in:
@@ -40,8 +40,33 @@ var user = require('./../user.js'),
|
||||
case 'users' :
|
||||
if (req.params.tab == 'search') {
|
||||
res.json({search_display: 'block', users: []});
|
||||
} else {
|
||||
user.getUserList(function(data){
|
||||
}
|
||||
else if(req.params.tab == 'latest') {
|
||||
user.getUserList(function(data) {
|
||||
data = data.sort(function(a, b) {
|
||||
return b.joindate - a.joindate;
|
||||
});
|
||||
res.json({search_display: 'none', users:data, yourid:req.user.uid});
|
||||
});
|
||||
}
|
||||
else if(req.params.tab == 'sort-posts') {
|
||||
user.getUserList(function(data) {
|
||||
data = data.sort(function(a, b) {
|
||||
return b.postcount - a.postcount;
|
||||
});
|
||||
res.json({search_display: 'none', users:data, yourid:req.user.uid});
|
||||
});
|
||||
}
|
||||
else if(req.params.tab == 'sort-reputation') {
|
||||
user.getUserList(function(data) {
|
||||
data = data.sort(function(a, b) {
|
||||
return b.reputation - a.reputation;
|
||||
});
|
||||
res.json({search_display: 'none', users:data, yourid:req.user.uid});
|
||||
});
|
||||
}
|
||||
else {
|
||||
user.getUserList(function(data) {
|
||||
res.json({search_display: 'none', users:data, yourid:req.user.uid});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user