Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
If user pictures are enabled and I edit my account, this is what is saved into the 'data' column of my users's db record:
a:4:{s:7:"contact";i:0;s:5:"block";a:0:{}s:14:"picture_delete";i:1;s:14:"picture_upload";s:0:"";}
The picture_delete and picture_upload do not need to be saved and for a site with a lot of users, that's a tiny less amount of processing for unserialize in user_load().
Comment | File | Size | Author |
---|---|---|---|
#6 | 343785-picture-upload-delete-values-D7.patch | 3.58 KB | Dave Reid |
#4 | 343785-picture-upload-delete-values-D7.patch | 3.62 KB | Dave Reid |
#3 | 343785-picture-upload-delete-values-D7.patch | 3.49 KB | Dave Reid |
#1 | 343785-picture-upload-delete-values-D7.patch | 3.39 KB | Dave Reid |
Comments
Comment #1
Dave ReidAttached patch that sets the values of those two fields to NULL in _edit_user_submit. Also fixed some FAPI code styles in the user picture account form.
Comment #2
Dave ReidSince this does not implement an API change, a minimal version of this patch should be backported to 6.x.
Comment #3
Dave ReidEven nicer formatting of the user_picture FAPI fields using #access. Yay FAPI!
EDIT: Patch has passed testingbot:
http://testing.drupal.org/pifr/file/1/2205
Comment #4
Dave ReidRevised patch that comments why there's #access properties on the form elements. Simply, if the user does not have a current user picture, it hides the picture preview and delete picture checkbox.
Instead of:
With the patch we have:
Much cleaner and easier to understand
Comment #6
Dave ReidHmm...I tested the patch and it applied cleanly to HEAD (with just a tad bit of offset). Reposting to let testing bot give it another try.
Comment #8
Dave ReidComment #9
Dave ReidComment #10
Dave Reid#357403: Move user picture to managed files fixed this in 7.x, so moving back to 6.x.
Comment #11
Dave ReidMerging into #173493: User picture fixes and cleanup.