Implements #893 Add get_user_by_username() helper function.