It seems to be looking for exact matches only, so a linear search against the entire user list should be fine, and should quite comfortable be adequate even for thousands of users, depending on hashing algorithm.
If they were plaintext it wouldn't need a linear search because the column could be indexed.