This question already has an answer here:

I want current logged in contact id. Is there any civicrm api method which can give me a current contact id?

merged by petednz - fuzion Nov 26 '18 at 18:47

This question was merged with Get current contact id? because it is an exact duplicate of that question.

Browse other questions tagged or ask your own question.