On the upgrade from 1.8.2 to 1.8.13 the way /var/lib/moodle profile pics where handle changed in a subtle way. From users/x to user/0 user/1000 user/2000 this is a very good idea, but I can’t find info about it on README.Debian or any other documentation, would be nice to add to the docs or/and ad a script to fix, as as moodle admin I just figure out today that all my users had the default happy face when not had uploaded their picture.
Anyway I fixed using mv and wildcards.
On users/ dir did:
mv 1??? ../user/1000/ -v
mv 2??? ../user/2000/ -v
mv 3??? ../user/3000/ -v
mv 1?? ../user/0/ -v
mv ?? ../user/0/ -v
and so on, of course a better and nice way must exist but that worked for me, in any case I want to share this with you and probably with any other puzzled moodle admin.
I found that this change goes back to moodle 1.8.3  to address the ext2 limitation of 32000 directories , also a script was added on the admin section  and can be used via web or CLI. Anyway I think it’s good idea to add information on the package documentation.
 admin/fixuserpix.php located normally on Debian on /usr/share/moodle/admin