I don’t think ‘current user’ would work. And custom state may not be needed.

Your method of searching user with email and checking user role of first item should work.

If this one is not working, I would check what is the search returning. Is search having right criteria? Are any privacy rules preventing you from getting data?