cleanup_bad_email_addresses.R is very quiet. It neither logs its activity nor sends out an email summary. We need a better record of the changes it is making.
To make this work, we need update_redcap_email_addresses() to return some data about what it did. We might want it to actually log the changes directly and send summary data back to the caller.
We would also want to suspend_users_with_no_primary_email() to return summary information about its activities. It would be difficult to get suspend_users_with_no_primary_email() to report which accounts were suspended given the nature of the update statement it uses.
With the summary data available, the ETL could write a summary record stating the number of users suspended and the number of email addresses revised. The summary record could also include the email address set for which users if desired.
cleanup_bad_email_addresses.R
is very quiet. It neither logs its activity nor sends out an email summary. We need a better record of the changes it is making.To make this work, we need
update_redcap_email_addresses()
to return some data about what it did. We might want it to actually log the changes directly and send summary data back to the caller.We would also want to
suspend_users_with_no_primary_email()
to return summary information about its activities. It would be difficult to getsuspend_users_with_no_primary_email()
to report which accounts were suspended given the nature of theupdate
statement it uses.With the summary data available, the ETL could write a summary record stating the number of users suspended and the number of email addresses revised. The summary record could also include the email address set for which users if desired.