mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-03 22:30:58 +01:00
closes #5143
This commit is contained in:
@@ -222,11 +222,33 @@ User.deleteInvitation = function (socket, data, callback) {
|
||||
};
|
||||
|
||||
User.acceptRegistration = function (socket, data, callback) {
|
||||
user.acceptRegistration(data.username, callback);
|
||||
user.acceptRegistration(data.username, function (err, uid) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
events.log({
|
||||
type: 'registration-approved',
|
||||
uid: socket.uid,
|
||||
ip: socket.ip,
|
||||
targetUid: uid,
|
||||
});
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
User.rejectRegistration = function (socket, data, callback) {
|
||||
user.rejectRegistration(data.username, callback);
|
||||
user.rejectRegistration(data.username, function (err) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
events.log({
|
||||
type: 'registration-rejected',
|
||||
uid: socket.uid,
|
||||
ip: socket.ip,
|
||||
username: data.username,
|
||||
});
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
User.restartJobs = function (socket, data, callback) {
|
||||
|
||||
@@ -97,6 +97,9 @@ module.exports = function (User) {
|
||||
},
|
||||
function (next) {
|
||||
markNotificationRead(username, next);
|
||||
},
|
||||
function (next) {
|
||||
next(null, uid);
|
||||
}
|
||||
], callback);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user