Topic: Adding avatars automatically
At the moment I am developing a simple addon that allows my forum users to generate avatars based on some data. I would like to add some code that would automatically resize the generated image to a specified size and set it as the user's avatar on the forums - no matter whether the user already has or does not have an avatar.
If user already has uploaded avatar, it is easy to change it to the newly generated one but since I have seen some data regarding avatar in the MySQL database, I suppose it is a bit trickier to write code that would set the avatar for a use that does not have one, am I right?
Could you give me little advice what code should I use? I got overwhelmed by the CMS's code when tried to find required pieces. I am strictly interested in how to set an image as user's avatar (I can handle uploading, resizing with imagick).