Active
Project:
Subuser
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2010 at 19:44 UTC
Updated:
7 Jul 2014 at 19:25 UTC
Jump to comment: Most recent
When I hit 'edit' for a subuser, I'm only able to access and modify the basic account information - the menu allowing me to edit profile categories is missing.
The menu appears as normal when logged in as the subuser.
Comments
Comment #1
Erica_der_Whatkin commentedMore info:
I'm using Drupal 6.15, and the problem only seems to occur when I'm logged in as a user who has Administer subusers privileges, but not Administer Users privileges.
Comment #2
Jackinloadup commentedSame issue
Comment #3
Jackinloadup commentednevermind, I'm dumb. I didn't have Administer subusers privilege on the correct role.
Comment #4
puravida commentedI have the same issue (and not because of "administer subusers"). I have allowed the proper role to "create subusers" and "administer subusers". However, once created, only the basic information is shown by clicking "edit" for that subuser.
If I check the "user" permission for "administer users", then the profile fields will display. However, this creates an even worse issue that anyone in that role can edit anyone else's subusers (if they are clever enough to modify the UID in the URL), which is unacceptable.
Can anyone please take a look at this and consider fixing the bug (if it's a bug) or adding an option for "administer own users"??
Many thanks,
Brandon
Comment #5
puravida commentedQuick update. I spent the last few days upgrading everything to Drupal 7 and finally got everything back to where I was on D6.
Now, I see that I still have this same issue. The edit/delete will only show for the UID1 user, unless I assign "administer users" permission to another role. I wasn't sure if you wanted me to open a new ticket specifically for the D7 version (7.x-2.0-alpha1, May 04, 2011) or not.
Cheers,
Brandon
Comment #6
puravida commentedNevermind. I completely forgot that I saw this issue: 1145350 - Finish 7.x-2.x port and that already told me that edit/delete isn't working yet. :)
Comment #7
dpantele commentedThe reason is that parent user doesn't have any access to the nodes authored by subuser.
Maybe, an access hook for several node types should be written? Or we should give edit access only for node which are profiles?
Comment #8
arcaicIf anyone is getting this issue then check if the subuser account has ever been logged in.
There is a check in core that will not allow the users account details to be viewed if the account has never been accessed (some issue about spamming apparently). This might be causing the problem for some.
There is a simple fix you can place in your own custom module that simple sets the 'accessed' value to that of the 'created' when the account is created. http://drupal.org/node/614688. Although the fix is set as v7 it works for 6 as well.
Took me two days to find the issue and once I found it 2 minutes to find out its been known about for ages. :-|
I think maybe the subuser module could employ the fix above possibly with a tick box in the settings that lets you choose whether to see use it or not.
Andy
Comment #9
smartsystems160 commentedi got this error too, but when i create the subuser and "switch" to the subuser account, then log out back to the parent account, then i can edit the subuser. seems the "switch" assumes that the user has logged in.
Update: Temporary workaround without coding: Once you create a subuser, click the "switch to subuser" link, then switch back to your parent account, you'll be able to edit the subuser
Comment #10
knsheely commentedI have this same issue and it appears to me to be an access issue in the profile module.
The subuser module uses hook_menu_alter to change the access of 'user/%user_categories' (subuser.module line 93) to its own subuser_user_edit_access (line 104). This allows the user_profile_form to be displayed to the parent with the correct 'administer subusers' permissions. This works great for displaying the basic information, however it does not display the profile fields because the profile_category_access function (profile.module line 474) still uses user_edit_access to display the fields.
I can get the fields to display if I hack the profile module to change line 474 to
.
I am still searching for a non-hacked solution. Any help would be appreciated
Comment #11
knsheely commentedI found another roundabout solution. Here it is:
1. Install Profile Access module
2. Make sure all roles are editable by the administrator at admin/settings/profileAccess
3. Grant administer users permission to all roles who should be able to edit any user.
4. In your module Create a new page with hook_menu() where you want your edit page to live. In my case I used 'user/%user_categories/subuser/%/edit' where %user will load the parent user and % will be the subuser's id.
Comment #12
lauriiiI would appreciate to see a patch about this issue
Comment #13
nancydru@knsheely: How is your menu path invoked? It is certainly not by the Views edit link handler.