Skip to content
Advertisement

I want get userid value from a private object

I want to get the userid from:

JavaScript

Here value from moodle $mod in cm info variable, I have tried var_dump($mod->userid); but it returns nothing.

JavaScript

Advertisement

Answer

You can use the global variable:

JavaScript

Check this out How to get user id of current user in moodle?

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement