tags:

views:

385

answers:

4

Hi,

I'm wondering if Drupal is the right choice for me. I need to create a solution where my "primary"-users should have the capability to create their "secondary"-users and provide access to certain paid subscriptions. Is that easily doable in Drupal, or am I better off not using that and looking elsewhere? (Alternative was to integrate Cake PHP into my custom app).

A: 

It's conceivably possible, but it'd require some custom coding. If you already have a custom app you'd likely be better off just extending it.

ceejayoz
+2  A: 

Drupal provides fine-grained access permissions, based on 'roles' - basically, classes of users (anonymous, administrators, etc.). Every drupal module has the ability to define permissions.

In this instance, I would create two user roles: primary and secondary. I would provide the primary role with the permission to 'administer users' (provided by user.module, and includes the ability to create new users, and to change the roles of users). I would provide the secondary users with the permission to 'access premium content' (which I assume is provided by some third-party module that you are using).

The Primary users would be in charge of creating secondary users, and assigning them the appropriate permissions.

EDIT: I am going to elaborate on my comment below; The Organic Groups module really does exactly what you asked, except with the goal of providing "[A place] ..where subscribers communicate amongst themselves." I am not sure if this is your goal, but it certainly creates a hierarchy of users.
OG is a highly active (read: supported) module, and could probably be considered a sub-project of Drupal itself since it has so many supporting modules of it's own.

HTH

threecheeseopera
Right - but each Primary user's set of Secondary users should be independent of each other - meaning a Secondary user can only belong to one Primary user and only that user can modify his properties.
Steve
I see your problem; there is no by-default user hierarchy functionality in drupal (afaik). If you used the Organic Groups module + helpers (http://drupal.org/project/og , http://drupal.org/project/og_user_roles), you could achieve what you want without custom code; however, I am not sure if you require the full functionality of OG in your site.If you wanted to hack it in w/o OG, off the top of my head: 1) Add some data to the user object, like 'parent user uid'.2) Use a module hook into <code>user_load()</code> to check parent/child relationship.
threecheeseopera
+3  A: 

You should be able to do much of you want using roles, permissions and the Subuser module for Drupal 6.

scronide
A: 

http://drupal.org/project/subuser
This is what you need I do believe.

DJ Monzyk