Hello everyone...
I have two questions:
1. I´m looking for the properties of the global $USER, i can´t find it... anyone???
2. when a user access a course, the report print "course view", how can i manage to change that and add the role the user has in the course (context)... anyone???
Please help me if you can...
Jorge...
If you want to physically view the $USER object, you can print it out on any view.php (I don't recommend this on a production server!) page or create your own page/script to view print it on.
Use something like:
global $USER;
print_object($USER);
You should get a long list of key-value pairs. You can also do the same with any objects ($CFG, $SESSION, etc.) in Moodle to have a look at them. I only ever do this on a testing server as it exposes sensitive data like your DB password.
Use something like:
global $USER;
print_object($USER);
You should get a long list of key-value pairs. You can also do the same with any objects ($CFG, $SESSION, etc.) in Moodle to have a look at them. I only ever do this on a testing server as it exposes sensitive data like your DB password.
Thanks that was soooooooo usefull.
Jorge...
Jorge...