Hi Everyone,
I have a problem with trying to retrieve user profile pics for inclusion in a mpdf60 PDF file. I have used solutions from other forum posts here to get the URL code and this works. I can can enter the direct URL in a browser or into a PHP echo statement and the picture appears perfectly eg:
http://XXXXXXXX/moodle/pluginfile.php/1267/user/icon/f1
and
http://XXXXXXX/user/pix.php/USERID/f1.jpg
But when I enter the same code into my PHP mpdf60 page, moodle retrieves the grey avatar picture instead of the correct image. (You know the grey image when a user does not have a picture uploaded). Any idea why the same URL returns the image to HTML but an avatar for mpdf60? I am not assuming that anyone will be able to help me with mpdf but maybe you know why the moodle returns two different values based on the exact same URL? Is there some sort of context or security that I need to take into account?
Moodle 3.1.1+ (Build: 20160714)
Thanks,
Gavin