theme_user_picture should be theme('user_picture',

Jody Lynn - January 2, 2008 - 18:22
Project:Members
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

In function members_page, theme_user_picture($account) should be written as theme('user_picture', $account). The difference is that the second way allows theme overrides. I'm sorry I didn't make a patch (I got confused about which versions to use in cvs).

#1

Junyor - January 8, 2008 - 03:31

You should make a patch against the DRUPAL-5 branch.

#2

Jody Lynn - January 11, 2008 - 16:27
Status:active» needs review

Patch attached

AttachmentSize
theme.patch 713 bytes

#3

Junyor - January 11, 2008 - 21:34
Status:needs review» reviewed & tested by the community

Patch applies and works as it should.

#4

psi-jack - July 22, 2008 - 20:15

Ahh, good. This is correct. I spent the last few days tracking this down, because I use imagecache_profiles (based on lullabot's approach), then it suddenly hit me. theme_user_profile is the last stack of the checking phase for theming, and shouldn't be called directly, as per Drupal API docs say to use theme().

Patch works, and fixes the problem and corrects the API regarding this specific issue.

 
 

Drupal is a registered trademark of Dries Buytaert.