Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
I wanted to have some fields from the content profile node on the main user edit form. I started with content_profile_register and made the neccessary changes.
Needs some testign but seems to be working fine. Please include this under /modules.
Comment | File | Size | Author |
---|---|---|---|
#11 | content_profile_useredit.patch | 2.45 KB | kristinellu |
#10 | content_profile_useredit.patch | 2.35 KB | kristinellu |
content_profile_useredit.tar_.gz | 3.31 KB | killes@www.drop.org |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedTHis is possibly a duplicate of #586464: integration with user/#/edit
Comment #2
fagohm, I must say I'm no fan of doing so, because I think drupal needs a better user account <-> profile separation and this is the opposite. Also I've no interest in maintaining more such "likely to break sometimes" code, so if you want to have it a proper module, best make a separate project for it .
update: Or we could add it as extension module to content_profile and I grant you CVS access for maintaining it, if you prefer. :)
Comment #3
fagooh and I just discovered http://drupal.org/project/account_profile
Comment #4
roball CreditAttribution: roball commentedAny progress with this issue?
+1 for an option to integrate the user profile on the user account edit page.
Comment #5
AdrianB CreditAttribution: AdrianB commented+1 from me as well.
fago: Afaik the account_profile module does the opposite of what most of us wants: to have one single user edit page with account information and content profile fields.
Comment #6
aroq CreditAttribution: aroq commentedgood module, but there is a bug on line #108:
node = content_profile_load($type, $form['#uid'], $language->language);
its not loading content node if node language is not set.
Comment #7
maria_zk CreditAttribution: maria_zk commentedthanks aroq. my 2 cents to make this work (as a really tmp solution):
change
$node = content_profile_load($type, $form['#uid'], $language->language);
to
$node = content_profile_load($type, $form['#uid'], 'en');
(for english)
A couple of things i noticed:
1.
"Use on administrative user creation form
Use this content type when an administrative user creates a new user"
Should be checked for User Registration otherwise fields are not displayed. Is this another bug??
and 2.
If the "administer users" permission is not checked for auth. users, then when trying to save the changes, this message is displayed:
"Detected malicious attempt to alter protected user fields."
Any ideas??
Thanks!!
Comment #8
aroq CreditAttribution: aroq commented2. for the error message:
line #132:
// Add more values @see node_form
foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {
$form_add[$key] = $node_form[$key];
}
there should be no "uid" here, as user_profile_form validator (user.pages.inc) checks the existence of "uid " in $form array and returns error if it is there. Unset it - and it will be working.
Comment #9
YK85 CreditAttribution: YK85 commentedHello,
It would be awesome to be able to select which content profile fields to show on the user/edit page. For example, ALL fields or just the firstname lastname fields etc.
Thank you for your hard work and I look forward to helping with testing if needed.
Comment #10
kristinellu CreditAttribution: kristinellu commentedHi,
This module just saved my day.
I'm attaching a patch that fixes the issues regarding node language and "Detected malicious attempt to alter protected user fields." warning. I hope it helps.
Comment #11
kristinellu CreditAttribution: kristinellu commentedIt was a problem with the upload, I'll re-post the patch.
Comment #12
maria_zk CreditAttribution: maria_zk commentedkristinellu your patch solved all the errors i was receiving. Sweet :)
Thank you so much, i confirm it works!
Kudos!
Comment #13
YK85 CreditAttribution: YK85 commentedHello,
Should this be marked as duplicate and moved over to #586464: integration with user/#/edit as that post started in Sept09? Are there major differences in the module here and the one at http://drupal.org/node/586464#comment-2819320 ?
Thanks!
Comment #14
rabihs CreditAttribution: rabihs commentedWhy can't I access the fields if I'm not logged in as admin?
Shouldn't each user see the fields on the user edit page?
Comment #15
YK85 CreditAttribution: YK85 commentedI was wondering if there has been any further development here?
I think this is what I need for my site.
Comment #16
chintan4u CreditAttribution: chintan4u commentedHi,
Thanks for this module. Saved a lot of work. However, I'am facing 1 issue.
I have 1 content type as content profile and have distributed the fields into multiple tabs (using cck_fieldgroup_tabs).
On Edit, the tabs and fields are appearing correctly, however Save button is visible only on the first tab. As a result, I'am unable to edit the fields on the remaining tabs.
Also, on Content Profile creation, the Save button is visible on all tabs.
Pls provide some help.
Comment #17
jordan8037310 CreditAttribution: jordan8037310 commentedI had very significant issues with using this module because the language wouldn't save while I had multiple languages enabled on the site.
In order to fix it I used the validation edit that ZoeN made here for the content_profile_edit module as he has similar issues: http://drupal.org/node/586464#comment-2818272
You put the below code into the content_profile_useredit_user_edit_validate function right before it ends.
Just wanted to copy it over here in case anyone else experiences the same thing.
If you put it above the following, it doesn't work:
This may point to the source of our issue as to why the Language isn't being saved, but I don't really have the time to look into this further.
Chers, JR