i want to know if there's a way to put the profile form with the user registration form when im creating a user with subuser, anyone know? :(

CommentFileSizeAuthor
#2 subuser-571660b.patch879 bytesvkareh
#1 subuser-571660.patch794 bytesvkareh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vkareh’s picture

Title: Creating profilçe with the user creation » Creating profile with the user creation
Version: 6.x-1.1 » 6.x-1.2
Assigned: Unassigned » vkareh
Status: Active » Needs review
Issue tags: +content profile
FileSize
794 bytes

I'm attaching a patch that adds this functionality for Content Profile.

vkareh’s picture

FileSize
879 bytes

Also, to allow the parent user to edit the Content Profile of their subusers, use the attached patch.

Note: You need the patches in both #1 and #2 for this functionality.

add1sun’s picture

Status: Needs review » Closed (duplicate)
dsayswhat’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

The original question may be a dupe, but the patches address the content profile module, not the profile module. That's a useful distinction (to me anyway, since I'm using the content profile module) so I'm marking this as 'RTBC'.

This doesn't appear to be a dupe of #474774: Display required user profile fields on subuser create form - that issue is focused on the profile module - this one addresses the content profile module. The problem is the same in both cases - the fields don't show for the subuser module - but the solution is very different if you look at the patches.

The patches here both applied cleanly for me...but I still couldn't do everything I wanted to because of some restrictions in the content profile module.

As it turns out, there was a patch required over at #697856: Introduce new permission: 'administer content profiles' which creates a permission so that you can grant the right to edit content profiles - this was required for my use case. I'd imagine anyone with subusers and content profiles would need that permission to get very far, so I thought I'd mention it here.

Dave Kopecek’s picture

vkareh's patches in #1 and #2 worked for me against 6.x-1.2. This patch provides a solution against the content_profile module. It appears more complete than the one in #474774.

Could someone apply this patch ?

blakehall’s picture

I'm keeping an eye on this issue, but until the patch in #697856: Introduce new permission: 'administer content profiles' lands it doesn't make much sense to commit to Subuser.

arcaic’s picture

I was getting weird behaviour with editing content profile nodes of subsusers and after investigation I found that content profile not only creates its own menu paths at user/%user/edit/'type' but it also alters menu paths of the form user/%user_catagory/edit/'type' as well.
The patch in #2 is modifying the access for the former but doesn't do the later which allows access to content profiles without going through the subuser access callback.

In subuser.module in function subuser_menu_alter change the for loop to as below...

    foreach (content_profile_get_types('names') as $type => $type_name) {
    
      if (!empty($items['user/%user/profile/'. $type])) {
        $items['user/%user/profile/'. $type]['access callback'] = 'subuser_user_edit_access';
        $items['user/%user/profile/'. $type]['access arguments'] = array(1);
      }

      if (!empty($items['user/%user_category/edit/'. $type])) {
        $items['user/%user_category/edit/'. $type]['access callback'] = 'subuser_user_edit_access';
        $items['user/%user_category/edit/'. $type]['access arguments'] = array(1);
      }
    }