mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
14 lines
No EOL
502 B
JavaScript
14 lines
No EOL
502 B
JavaScript
import Telescope from 'meteor/nova:lib';
|
|
import MailChimpList from './mailchimp/mailchimp_list.js';
|
|
import Users from 'meteor/nova:users';
|
|
|
|
function subscribeUserOnProfileCompletion (user) {
|
|
if (!!Telescope.settings.get('autoSubscribe') && !!Users.getEmail(user)) {
|
|
MailChimpList.add(user, false, function (error, result) {
|
|
console.log(error);
|
|
console.log(result);
|
|
});
|
|
}
|
|
return user;
|
|
}
|
|
Telescope.callbacks.add("users.profileCompleted.async", subscribeUserOnProfileCompletion); |