Closed (fixed)
Project:
Avatar Selection
Version:
5.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
21 Aug 2007 at 15:44 UTC
Updated:
5 Sep 2007 at 18:03 UTC
Hello again.
I'm embedding a third party forum into Drupal, and want to use the User-selected Drupal Avatar in the forums. I can do this on another of my drupal installations which does not have Avatar Selection installed by referencing the /files/pictures/picture-.jpg in the forum template. But I can't determine how Avatar Selection saves the user picture selected. I would think it would copy the selected avatar to /files/pictures/ using the user Id as the identifier, but it's not.
Any easy way I can identify the user picture from a third party app when all I have is the user ID?
Thanks!
Jeff
Comments
Comment #1
stella commentedYou can identify the image being used as the user's avatar by looking at the "picture" column in the "users" table in your site's drupal database. The "pictures" directory is only for user uploaded images.
Cheers,
Stella
Comment #2
Steel Rat commentedTrying to figure out the best way to do this. I looked through the avatar_selection.module to see when the picture selection was being stored, but saw no reference to the picture field as anything other than part of an array variable.
Comment #3
stella commentedThe avatar selection module doesn't write to the users table. It just modifies the core drupal form which is processed by drupal core, so you won't see any reference to it in the avatar selection code. If you want to look at this code, you will have to look at drupal's "modules/user/user.module".
The global $user->picture variable will give you the path to the avatar image. If you don't have that variable, or you want to do it for a user that isn't the current logged in user, you can get a user object like:
Cheers,
Stella
Comment #4
(not verified) commented