'Uses v1 system to add users, i.e. saving to system.users.'

def _legacy_add_user(self, name, password, read_only, **kwargs):

    system_users = self._collection_default_options('system.users')
    user = (system_users.find_one({'user': name}) or {'user': name})
    if (password is not None):
        user['pwd'] = auth._password_digest(name, password)
    if (read_only is not None):
        user['readOnly'] = read_only
    user.update(kwargs)
    user.setdefault('_id', ObjectId())
    try:
        system_users.replace_one({'_id': user['_id']}, user, True)
    except OperationFailure as exc:
        if ('login' in str(exc)):
            pass
        elif (exc.details and ('getlasterror' in exc.details.get('note', ''))):
            pass
        else:
            raise
