The line above looks in the user table to see if a badge criteria is met.
I believe some of these columns were removed recently.
It doesn't seem possible to create a new badge that uses the removed fields, but I'm thinking it must be possible for existing badges that were previously defined to try to access these fields, since we saw an error pointing us in this direction (specifically for the u.url field).
Is there an upgrade step to move these badges to use the new code instead?