Needs review
Project:
Edit profile
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2011 at 20:47 UTC
Updated:
18 Sep 2013 at 08:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
milos.kroulik commented+1
Comment #2
BenK commentedSubscribing
Comment #3
rolandk commented+1
Comment #4
damj commented+1 and the signature field too
Comment #5
Tsubo commented+1 any movement on this likely?
Comment #6
Tsubo commentedI've taken a stab at this. I'm not familiar with the process of patching so I'll just include the code here. Two functions in the existing module need modification: Replace the two existing functions with these two and you should be good to go. I've included comments....
I also deleted the function 'edit_profile_field_extra_fields_alter(&$info)' so I could continue to control the position of the Picture field in relation to other fieldable entities via Manage Fields - which this module otherwise prevents.
If anyone has a more elegant solution - please let me know.
Comment #7
David_Rothstein commentedThanks for starting on this. Note that http://drupal.org/patch may be helpful in learning how to turn this into a patch.
I took a quick look and had a couple comments:
It's probably not safe to unilaterally set it to TRUE (since access may have been denied for other reasons). I think it would be better to add it to the list of elements that we don't set to FALSE in the first place.
I would think we still need to hide the other "extra fields" that edit_profile_field_extra_fields_alter() is hiding, and only let Picture be on the list of extra fields? Since that's the only one that will appear on the Edit Profile screen with the other user fields.
Actually, there might not be any code change necessary at all here yet... If I'm not mistaken, until #967566: Several important Core User settings need to implement hook_field_extra_fields() is fixed the Picture field doesn't show up on the Manage Fields tab anyway?
Comment #8
microwavemayo commentedFor those needing a quick fix, you can alter this right in your template.php file or a custom module with the following:
Comment #9
Tsubo commentedCan I just check the status on this. I'm currently still running core7.8 - but can I assume if I upgrade to 7.10+ that this is solved?
Comment #10
duaelfrHere is a patch introducing a new settings page where the administrator can choose to move the user picture to the profile edit page or not.
I respected #7 advice by not overriding #access attribute.
I hope you will find this useful.
This patch is part of the #1day1patch initiative.
Comment #11
David_Rothstein commentedDidn't try it out, but looks great overall. Thanks!
Just a couple small comments:
Don't know if it's really necessary to add a new permission to the module just for this settings page - maybe just use 'administer users' for starters?
The function should take $form and $form_state as parameters (since those are passed in and $form could in theory be non-empty), rather than defining $form as an empty array.
Comment #12
portulaca+1
Comment #13
NineAllexis commentedI end up disabled the default user pictures feature and creating my own field in Config/People.
That's perhaps because I need to segregate user uploads to each of their own folder. Which is kinda impossible configuration with the default user pictures settings.
Comment #14
duaelfr@NineAllexis :
It is another way to go but a lot of modules rely on the user picture and not on a custom field so you may experience some issues.
@David_Rothstein :
I finally rerolled the patch with the change for the form function but I left the new permission. Indeed, there are a lot of discussions about splitting the "administer users" permission because it currently give too much rights to the user. As this won't be fixed in core before D8 I think it is a bad idea to make this choice.
I prefered to make a new patch instead of committing this fix on my own to get your final opinion about this permission.