How does sub users work?

Discussion in 'Customization & add-ons' started by engineerwsu, Sep 23, 2015.

  1. engineerwsu

    engineerwsu Member

    Joined:
    Sep 18, 2014
    Messages:
    31
    I'm looking for some more information on exactly how the integration plugin "subusers module" works and what functionality it will gain me.

    What I need is a feature to allow a parent user to create an account, then, using email addresses, add sub user accounts which share the same account information. Similar to how an admin can create a user by simply entering an email address and generate a password, a parent user should be able to create sub users which are child-level accounts. There is no payments to be made, but rather a feature that a parent member can create a designated number of sub user accounts who will share data with them.

    Sub user permissions would be restricted to only access the subscription but not change account information.

    Is there something like this possible with the integration subusers module or maybe another module?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
  3. engineerwsu

    engineerwsu Member

    Joined:
    Sep 18, 2014
    Messages:
    31
    Is there a way to demo the sub users module before buying it? I didn't notice it being part of the demo. I don't mind buying it but it needs to offer the functionality I need.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Unfortunately there is no demo for this module.
    You can purchase it and test then if you don't find it useful, we will refund your order.
  5. secureglobal

    secureglobal New Member

    Joined:
    Feb 25, 2013
    Messages:
    3
    I've installed and setup subusers, I'm not sure it will be useful for what I need unless I have it customized because I wanted additional users to access the same account as the reseller and to manage the same account (rather like adding permissions to additional users for the same account) - I'm going to give it a go although firstly I can't seem to be able to see the 'resellers tab' after I've logged in as the reseller. I've setup the reseller product and also the subuser product and linked those products but there's no 'reseller tab' to manage subusers when I login as the reseller.. am I missing something obvious?

    I'd appreciate it if anyone could point me in the right direction?
  6. len_nels1

    len_nels1 aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    13
    Can the parent - child relationship be accessed through your API? Can you point me in the right direction? I need to know if a particular user is a subuser and whom their parent is from a third party script. Thanks.
  7. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You need to check field subusers_parent_id, this field contain user_id of parent user. Also you can filter by this field to find all subusers of specific parent user.
  8. engineerwsu

    engineerwsu Member

    Joined:
    Sep 18, 2014
    Messages:
    31
    I purchased this module and I'm finding that while it probably could offer the capabilities I need, it will require some custom scripting work. At least that's what I'm seeing at this point. Here's the features I'm having trouble with and/or need.

    1.) configuring the subusers module allows some basic functions, but doesn't appear to allow a subuser to actually share the reseller's account, which is what I really need. As was mentioned, the parent-child relationship is the key to being able to do this.

    This call can be used to get the user id of the subuser's parent reseller:
    Am_Lite::getInstance()->getUser()['subusers_parent_id'];

    This is helpful, but when I then run:
    Am_Lite::getInstance()->haveSubscriptions()
    to determine if the user's subscription is still active, of course it tells me it's fine. So the parent's account could expire maybe and the subuser's account would still work.

    2.) probably the bigger issue for me is that products must be configured for subusers. This is perfectly fine except that each subuser must be assigned a product. It makes sense for the subuser to be assigned the same product type as the parent reseller, BUT I've noticed that subusers then also have access to create their own subusers. This is a really big problem for me. Subusers should not be allowed to create additional subusers.

    How do you recommend setting this up? I've contemplating setting up yet another product that is specific to subusers which doesn't allow subusers, but then that product would be listed in the shopping cart and I don't want that.
  9. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    The main idea of this module is have different product for main user and subsusers. You can
    configure same access for both products if you want but it should be different products.

    So you need to set up one product eg 'Reseller Package (10 subusers)' and set 10 subusers for it
    and also you need to set up separate subuser product 'Subuser Product' and configure access based on this product. Then assign 'Subuser Product' as subuser product for 'Reseller Package (10 subusers)'

    Reseller buy 'Reseller Package (10 subusers)' and can add 10 subsusers and give him access to product 'Subuser Product'. Subusers will get access according 'Subuser Product' product and will not be able to add its own subusers. Obviously 'Subuser Product' should not allow to add subsusers.
    techgeek likes this.
  10. insafalihack

    insafalihack New Member

    Joined:
    Dec 2, 2021
    Messages:
    2
    i have amember pro Subusers plugin I send invoite to already registred user but how i accepts reseller request
  11. halmaclean

    halmaclean aMember Pro Customer

    Joined:
    Aug 30, 2013
    Messages:
    50
    We use sub-users a lot in some of the sites we set up and run for different clients.

    The concept is that a reseller (parent user) is assigned a product that itself grants access to a second product for a set number of users. Therefore, we have 'reseller products' that we sell to the reseller, and 'sub-user products' that each reseller can then allocate to their users. The sub-user is not able to share the reseller account directly because that would make them also a reseller... they are sub-accounts to that in the context that the reseller manages the account set up and access to content.

    We specialise in online learning, and so our 'resellers' are often HR team leaders in a corporate setting who need to enroll their staff into online training. The HR team leader may also require online training too - it may be a compliance thing, for example - and so we integrate the reseller product to the online training course as well as integrate the sub user product to the same. The reseller can then complete the training as well. Occasionally, we find that resellers also enroll themselves as a sub user to their own accounts (using a different login name and email), and access the training that way.

    We also use the sub-user plugin to allow departments to manage their own users and access to different content - no 'selling' is involved, but access can be controlled by the department without giving them a login to the aMember Control panel itself.

    There are some limitations to this, but the core concept of what 'sub-users' does is reliable and works well. Where we have found limitations we have developed bespoke code to provide what we need. For example, manual approval of new accounts is not a part of sub-users... but it is possible to extend the plugin to allow it. This means you can set up a registration form for the reseller, and they can manage any new users within their account, removing any that are not legitimate.

    Important to note that 'resellers' can have multiple products that they assign to their users, meaning they can have some users with access to product 'A' and others with access to product 'B'... and some with access to both.
  12. halmaclean

    halmaclean aMember Pro Customer

    Joined:
    Aug 30, 2013
    Messages:
    50
    May need a bit more detail here...

    You've got a registered user, and you want them to become a reseller? You can do this just by assigning the 'reseller' product to them which they can use to grant access to whatever other product you set it up for.

    You want to allow people to register as a reseller? You can set up a registration process for this, and decide who you want to accept into your reseller program. You can then create reseller products with different capabilities, and add them to your shop. Your 'resellers' can then purchase what they wish to sell on to their users.

    Note that they do not have to sell anything to their users, they can just grant access for free. If they are selling, this does not take place in your system - they have to have their own way of selling access to the content, collect the money and then grant access to your system.

Share This Page