'Gets users that match user_id case insensitively.
Returns a mapping of user_id -> password_hash.'

def get_users_by_id_case_insensitive(self, user_id):

    def f(txn):
        sql = 'SELECT    name,    password_hash    FROM    users    WHERE    lower(name)    =    lower(?)'
        txn.execute(sql, (user_id,))
        return dict(txn)
    return self.runInteraction('get_users_by_id_case_insensitive', f)
