Hi John;
I use this simple code:
global $USER;
$string = $USER->profile['fieldname'];
Just change the 'fieldname' to the custom field you want to display.
Hope that helps!
Hi John;
I use this simple code:
global $USER;
$string = $USER->profile['fieldname'];
Just change the 'fieldname' to the custom field you want to display.
Hope that helps!
Dear all, I'm trying to run this sql in Moodle 2.8.5 but it gives me an error message back!
Could someone help me in writing one sql to display a custom user profile field called "Targetgroup" in the shortname?
Thanks!
I got this working for Moodle 2.8+
Federica - if you are still having problems paste your sql and we'll look at it.
Where would this go? At the top? I'm sorry I'm new to this.