4

Is there a hook-independent way to get the logged in member id inside a hook handler?

Something like a function or a global variable?

9

Yip. You're looking for:

ee()->session->userdata('member_id');

It's in the session class:

http://ellislab.com/expressionengine/user-guide/development/usage/session.html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.