mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00
13 lines
No EOL
454 B
JavaScript
13 lines
No EOL
454 B
JavaScript
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("profileCompletedAsync", subscribeUserOnProfileCompletion); |