mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
user registration now no longer sends a welcome email if no emailers are present
This commit is contained in:
@@ -202,8 +202,8 @@ var fs = require('fs'),
|
||||
} else return;
|
||||
};
|
||||
|
||||
Plugins.hasListeners = function(hook, callback) {
|
||||
return Plugins.loadedHooks[hook].length > 0;
|
||||
Plugins.hasListeners = function(hook) {
|
||||
return (Plugins.loadedHooks[hook] && Plugins.loadedHooks[hook].length > 0);
|
||||
};
|
||||
|
||||
Plugins.fireHook = function(hook, args, callback) {
|
||||
|
||||
@@ -886,6 +886,10 @@ var bcrypt = require('bcrypt'),
|
||||
|
||||
User.email = {
|
||||
verify: function(uid, email) {
|
||||
if (!plugins.hasListeners('action:email.send')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var confirm_code = utils.generateUUID(),
|
||||
confirm_link = nconf.get('url') + '/confirm/' + confirm_code;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user