General developer forum

user images

 
Picture of Peter Easton
user images
 

Is it possible to have a script/plugin that well detect if the user has a profile image and if he doesn't add a url to an existing ID photo? we have a directory of all users ID photos by username and we'd like this to show if they don't add one manually.


Pete

 
Average of ratings: -
Picture of Ken Task
Re: user images
Particularly helpful Moodlers

View your own image in this forum.

https://moodle.org/pluginfile.php/11602/user/icon/moodleorgcleaned_moodleorg/f1?rev=1295353

See the 'f1' ... that's the real file name me thinks .... in the meta data of the DB (every user has an 'f1' image ... but buried in the moodle file system somewhere the file is named via a content hash name and spread all over creation in filedir. :\

But, in looking at the URL to your own image above one might be able to create a looping script the checking user ID numbers .... assuming 11602 is your user id number on this system.

Did have a sys admin one time who found the url to his pic and was using that URL as an 'uptime checker' of his own making .... if that helps any.

'spirit  of sharing', Ken


 
Average of ratings: -
Picture of AL Rachels
Re: user images
Core developersParticularly helpful MoodlersPlugin developersTesters

Hi Peter,

If you have photos of everyone by user name, zip them up into one zip file, then  go to Site administration > Users > Accounts > Upload user pictures. On the Upload user pictures, page, make sure, Overwrite existing user pictures?, is set to No, then finish the upload. This will leave students manually added pictures alone, but put your version there for everyone else.

 
Average of ratings: Useful (2)