                     # at least we can limit its size.
                     cb("email address must be at most 128 characters: '#{email_address}'")
                     return
-                done  = false
-                account_id = undefined
+
                 locals =
-                    settings = undefined
+                    done       : false
+                    account_id : undefined
+                    settings   : undefined
 
                 async.series([
                     # already have an account?

                            email_address : email_address
                            cb            : (err, _account_id) =>
                                dbg("account_exists: #{err}, #{_account_id}")
                                account_id = _account_id
                                cb(err)
                    (cb) =>
                        if account_id
                            dbg("user #{email_address} already has an account -- add directly")
                            # user has an account already
                            done = true
                            @database.add_user_to_project
                                project_id : mesg.project_id
                                account_id : account_id
                                group      : 'collaborator'
                                cb         : cb
                        else

                                    if err
                                        cb(err)
                                    else if when_sent >= misc.days_ago(7)   # successfully sent < one week ago -- don't again
                                        locals.done = true
                                        cb()
                                    else
                                        cb()
