v1.18.x
Baris Usakli 8 years ago
parent 4ac8d29f06
commit 9dc0069ce7

@ -65,7 +65,7 @@
"nodebb-plugin-spam-be-gone": "0.5.0", "nodebb-plugin-spam-be-gone": "0.5.0",
"nodebb-rewards-essentials": "0.0.9", "nodebb-rewards-essentials": "0.0.9",
"nodebb-theme-lavender": "4.0.5", "nodebb-theme-lavender": "4.0.5",
"nodebb-theme-persona": "5.0.16", "nodebb-theme-persona": "5.0.18",
"nodebb-theme-slick": "1.1.0", "nodebb-theme-slick": "1.1.0",
"nodebb-theme-vanilla": "6.0.13", "nodebb-theme-vanilla": "6.0.13",
"nodebb-widget-essentials": "3.0.1", "nodebb-widget-essentials": "3.0.1",

@ -88,11 +88,6 @@ User.getUsersWithFields = function (uids, fields, uid, callback) {
user.banned = parseInt(user.banned, 10) === 1; user.banned = parseInt(user.banned, 10) === 1;
} }
if (user.hasOwnProperty('banned:expire')) {
user.banned_until = parseInt(user['banned:expire'], 10) || 0;
user.banned_until_readable = user.banned_until ? new Date(user.banned_until).toString() : 'Not Banned';
}
if (user.hasOwnProperty(['email:confirmed'])) { if (user.hasOwnProperty(['email:confirmed'])) {
user['email:confirmed'] = parseInt(user['email:confirmed'], 10) === 1; user['email:confirmed'] = parseInt(user['email:confirmed'], 10) === 1;
} }

@ -168,6 +168,11 @@ module.exports = function (User) {
if (user.hasOwnProperty('lastonline')) { if (user.hasOwnProperty('lastonline')) {
user.lastonlineISO = utils.toISOString(user.lastonline) || user.joindateISO; user.lastonlineISO = utils.toISOString(user.lastonline) || user.joindateISO;
} }
if (user.hasOwnProperty('banned:expire')) {
user.banned_until = parseInt(user['banned:expire'], 10) || 0;
user.banned_until_readable = user.banned_until ? new Date(user.banned_until).toString() : 'Not Banned';
}
}); });
plugins.fireHook('filter:users.get', users, callback); plugins.fireHook('filter:users.get', users, callback);

Loading…
Cancel
Save