Only show "delete picture" option if picture exists
ChrisKennedy - October 20, 2007 - 23:54
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | user system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
If pictures are enabled, the user edit page has two additional options: one to delete the current picture and one to upload a replacement picture. The delete option should only be shown if a picture already exists; if not the option is useless. This patch fixes this functionality.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| delete_picture.patch | 910 bytes | Ignored | None | None |

#1
Tested with:
Patch works as advertised. Marking as RTBC.
#2
Agreed, committed. The previous code was dependent on the theme function returning an empty string if there is no picture, but this might not be the case if for example you have a default picture or would otherwise return a placeholder anyway if there is no picture.
#3
Automatically closed -- issue fixed for two weeks with no activity.