Data exposed to Blocks?

Re: Data exposed to Blocks?

by Tim Hunt -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just do

print_object($USER);

somewhere in your code, and see what you have got.

$USER is basically get_record('user', 'id', {current user id});

but with some extra bits. It is initialised in require_login, if I remember correctly.