    def _add_task(self, task):
        # type: (Task) -> None
        '''
        Adds a new task to the user specified by that task.

        Args:
            task (Task): the task to add.
        '''
        username = task.username
        if self.valid_user(username):
            # Ignore blacklisted users
            if self.blacklist.is_present(username):
                logging.info('Ignoring task for blacklisted {0}'.format(username))
                task.comment = 'blacklisted'
                task.set_verifying()
            else:
                user = self.user_lookup_by_name(username)
                user_id = user['id']
                if user_id not in self.active_users:
                    logging.debug('Adding {} to active users'.format(username))
                    self.active_users[user_id] = user
                    self.greet_user(user)
                user.add_task(task)
                task.set_in_progress()
        else:
            # Escalate if no valid user is found
            logging.warn('Invalid user: {0}'.format(username))
            task.comment = 'invalid user'
            task.set_verifying()
Adds a new task to the user specified by that task.

Args:
task (Task): the task to add.
securitybot/bot.py