get_realm is better in two key ways: * It uses memcached to fetch the data from the cache and thus is faster. * It does a case-insensitive query and thus is more safe.
(imported from commit 0ffb565ecc9be219807ae9a45abb7b0e3e940204)