Closed (works as designed)
Project:
Subuser
Version:
6.x-1.5
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2011 at 21:46 UTC
Updated:
1 Jul 2013 at 08:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lonehorseend commentedThe path in the module is user/%user/subuser/create. The %user is the user id of the person trying to add the subuser.
So you have 3 options:
For this option, you need to change line 37 (the one related to
$items['user/%user/subuser(line 31)) from'type' => MENU_CALLBACK,totype' => MENU_LOCAL_TASK,in the subuser.moduleMake sure whoever is in charge of creating / editing / managing the view has the ability to do PHP code as an input filter (you don't want to make this available for everyone) and select that filter in the input filter section and then just do a variation of the link name (I used Create Employee because that's what my subusers are called) shown in the attached screenshot.
Comment #2
lonehorseend commentedScreenshot
Comment #3
blakehall commentedWith proper permissions configured, you'll also see a create subuser link from the My Account page (user/%UID)
Comment #4
wallbay1 commentedThanks guys
Comment #5
smartsystems160 commentedJust FYI for those looking for information on this too. There is yet another way to get this link working with views, without php (In case you dont want php enabled on your site for personal reasons).
Create a view of type 'user'.
In the fields options, output the 'user:uid' field and exclude this field, output the 'global:custom text' field and select 'output this field as a link'. In the link path, enter 'user/[uid]/subuser/create' (without the quotes.. Also, '[uid]' here is the replacement field for your user id, if your user id field is different, then adjust accordingly).
In the 'arguments' option, select 'user:uid' => provide default argument => user id from logged in user. Now you have your link.
Adjust your 'items to display' under 'basic settings' to 1, to have this link displayed only once.
Add a block to this view you created. You can now go to the blocks administration page (/admin/build/block) to access the view and place it on any page you want. In my case i placed it on the '/subuser' page since thats where i want it to be.
Comment #6
mooru commentedAll permissions are set correctly but i don't see the subuser menu on user account except admin