Fix #30898 we have an option `SearchByEmail`, so enable it, then we can search user by email. Also added a test for it. (cherry picked from commit 5d6d025c9b8d2abca9ec2bfdc795d1f0c1c6592d)