How to get the current user id?

How do I get the current user id?
For example in a conditional query where I want to show posts in a list if column creator_id = current_user_id

Community Page
Last updated: