You immediately find in the docs the way handle to userid:
qa_handle_to_userid($handle) returns the userid for the user identified by
null if no user matches. This requires Q2A 1.6+, but see also
qa_userids_to_handles(...) which were added in Q2A 1.5.
With v1.6 there was a new function implemented for userid to handle:
which is not yet in the docs.