Have no emails send to employers who haven't logged in

This commit is contained in:
Michael Schmatz 2014-07-17 09:50:18 -07:00
parent e4d4c973da
commit 0561235da2

View file

@ -253,6 +253,8 @@ makeEmployerNamesEasilyAccessible = (allEmployers, cb) ->
employersEmailedDigestMoreThanWeekAgoFilter = (employer, cb) ->
if employer.emails?.employerNotes?.enabled is false
return cb true
if not employer.signedEmployerAgreement and not employer.activity?.login?
return cb true
findParameters =
"user": employer._id
"mailTask": @mailTaskName