This bug was found by azuledu: "one profile of each type is created when a new user is registered. I think that only the profiles that appear in registration page should be created.".
I will attach a patch for it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andreiashu’s picture

Here is the patch.

Edit: this doesn't resolve the issue when you go to the user profile page ('user/uid') all profiles types are displayed.

azuledu’s picture

Yes, it's better to open a new issue.
Your patch works for me. Thanks again.

nadavoid’s picture

I had to apply this patch manually. Maybe that's because I had already applied two other patches:
- 0001-Fix-autoassign-module-n-First-argument-is-expected.patch
- dont_show_group_fields.patch

In any case, this patch didn't work for me. I've detailed what's happening for me here: #339180: Nodes for all profile types are created at registration, regardless of settings. Here's probably the important part:

=== what happens ===
I navigate to: Create new account -> Register as coach, which is /user/coach-register.
Fields from both profiles appear on the registration form.
I fill in the required fields. My account is created.
Two profile nodes are created, a coachprofile and a studentprofile.

=== expected ===
To have only fields from the relevant profile content type appear on the registration form.
To have only relevant nodes created.

Is there another patch I need to apply?

Or maybe a better question: What patches to I need to apply, and in what order, to get the current status?

nadavoid’s picture

update: I applied these patches in order, on a fresh Drupal 6 install, and this problem was solved. Now when a user registers, only relevant nodes are created.

I applied these patches:
1. 0001-Fix-autoassign-module-n-First-argument-is-expected.patch (from http://drupal.org/node/321110#comment-1118194)
2. the update mentioned here: http://drupal.org/node/321110#comment-1129688
3. dont_show_group_fields.patch (from http://drupal.org/node/337199)
4. auto_profile_creation_during_registration.patch (from this page: http://drupal.org/node/337423#comment-1119820)

THEN I installed the autoassignrole. I suspect that the reason these patches weren't working for me earlier has do do with the weight of the autoassignrole module, which is set in the .install file.

It's working nicely! Thank you!

upupax’s picture

Sorry, do you plane to release a new -dev version with all this patches?

liquidcms’s picture

tried all the patches, i guess i was hoping this solved the issue with AAR and CP combining to replace the old role_signup.module.. but i guess it still doesn't do that..

MrVee’s picture

Patch 4 mentioned in nadavoid's post at #4 doesn't work for me, it says "malformed patch at line 39".

I have AutoAssignRole and Content Profile installed. When I add a field to Content profile which is intended for "Role 1" it also displays in "Role 2" registration page. How can I resolve this issue?

I've tried Nadavoid's suggestions to apply the patches he mentions but the fourth patch doesn't want to be applied.

Any help will be appreciated. Please.

IckZ’s picture

Category: bug » task

Is any of these patches mentioned in #4 already in the current dev version of auto assign role?

gmclelland’s picture

Can someone please update us on the status of this issue?

The Auto Assign Role module is creating a node for all the content profile roles, I want it to ONLY create roles for the content profiles that the user selected on the registration page. If no profiles are selected, then it should only create the Content Profile's profile node.

What's your thoughts about this?

Do these patches still work?

I tried patching, but it didn't work. I even tried manually applying the code.

gmclelland’s picture

Can anyone give an update? I have tried tracking this down, but can't seem to find it.

This problem is really annoying because it shows each role's box on the user's "my account" page even if the user didn't select the role when he/she registered.

fago’s picture

Also have a look at #477910: fix / simplify content profile integration, this should fix that issue too.

gmclelland’s picture

@fago - It does fix this issue.

cyberswat’s picture

Status: Needs review » Fixed

#477910: fix / simplify content profile integration was committed today so tentatively marking this issue fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fromtheindia’s picture

Status: Closed (fixed) » Active

Hi,

I am using drupal-6.22 and Auto Assign Role 6.x-1.2. I am not able to register different roles, even i am not able to apply the patches available.

Thanks,