mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
closes #1635
if email isnt confirmed, show a warning in account/edit and let users resend confirm email
This commit is contained in:
@@ -24,6 +24,23 @@ SocketUser.emailExists = function(socket, data, callback) {
|
||||
}
|
||||
};
|
||||
|
||||
SocketUser.emailConfirm = function(socket, data, callback) {
|
||||
if (socket.uid && parseInt(meta.config.requireEmailConfirmation, 10) === 1) {
|
||||
user.getUserField(socket.uid, 'email', function(err, email) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (!email) {
|
||||
return;
|
||||
}
|
||||
|
||||
user.email.verify(socket.uid, email);
|
||||
callback();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
SocketUser.increaseViewCount = function(socket, uid, callback) {
|
||||
if (uid) {
|
||||
if (socket.uid !== parseInt(uid, 10)) {
|
||||
|
||||
Reference in New Issue
Block a user