Answers.Body: <p>Not exactly the fine control you're looking for, or ideal by any means, but one direction might be to create an "Account" channel with a related user field for 'User' (required; limit to 1; from userGroup 'Regular User') — or vice-versa (related "Account" entry in "Users").</p>
  
  <p>You can then restrict your Account Admins to only edit 'Accounts' (and Products) entries that belong to them, with all the custom fields that are required.</p>
  
  <p>The problem here is that you wouldn't also want the Account Admin to be able to edit or assign permissions to users (thus defeating the purpose). And there is no way to automatically assign a new user (created through the CP) to a userGroup (as far as I know). Users can however automatically be assigned through the front-end through "allow public registration" and "default user group" settings. So, an Account Admin could technically create a new user through the front-end. And then (back in the CP) create a new 'Account' entry, and relate that account to the user they just created.</p>
  
  <p>They would still require an admin to edit or delete the user, but maybe that's ok. </p>
  
  <p>You would also need checks in place to ensure that only one account was assigned to any one user, somehow. If you reverse the relationship (i.e. related 'Account' entries field in 'Users'; limit 1), then you could ensure the 1-to-1, but this would require an admin to relate the two together.</p>
  
  <p>Admins, of course, could do all of this through the CP and assign the "Account" to the Account Admin, by just setting the author.</p>
  
  <p>Not ideal of course, but perhaps a step in the right direction.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-23T20:00:28.603Z
Answers.LastActivityDate: 2014-09-23T20:07:05.777Z
Answers.LastEditDate: 2014-09-23T20:07:05.777Z
Answers.UserDisplayName: Douglas McDonald
Body: <p>(I have a lot of experience with custom PHP and JS code and multiple frameworks and a few CMS's, but little experience with Craft.)</p>
  
  <p>I'm working on a site and they want to have multiple accounts and admins and users that fit in that paradigm, and I'm not sure the best way to approach it.</p>
  
  <p>So general admins should be able to create new accounts and account admins. Account admins can log in and add products for their account <em>only</em>. And then the regular site is locked behind a login so that "regular" users must log in and be associated with an account and can. Both Account Admins and General Admins should be able to create "regular" users (but the former for their accounts only).</p>
  
  <p>I was maybe thinking of associating extra fields to User Groups and trying to go at it in that route. I see you can edit User Profiles with Pro, but I don't see a way to customize User Groups (maybe we don't fully need that, but maybe just let those general admins create User Groups (can this be renamed "Accounts?").</p>
  
  <p>I realize this is a bit of a vague/open ended question. Maybe this isn't really practical in Craft, or will need a lot of custom work...? Or maybe someone has a plugin with this in mind? Just looking for some general help, and this seemed like the place to start!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-15T05:27:27.007Z
Comments.Text: Just a finer note on User Groups and custom fields, while you're pondering your options... Any custom fields which you assign to users will be applied to _all_ user groups equally. Currently there is no way to give different fields to different user groups. Just wanted to give you a heads up, because that's bitten a few people in the past (including me).
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-15T05:29:58.647Z
Comments.Text: I think as users go, it may work out okay because we don't really care about anything other than login for anything other than those "regular" users, so the extra fields I would put on them should be okay to be ignored. But that is good to know and a little unfortunate. Was hoping for finer User/User Group control.
Comments.UserDisplayName: CWSpear
Tags: <users><user-groups>
Title: What's the best way to create a multiple account architecture?
ThreadText: # What's the best way to create a multiple account architecture?
  
  (Asked by: username_0 on 2014-09-15)
  
  (I have a lot of experience with custom PHP and JS code and multiple frameworks and a few CMS's, but little experience with Craft.)
  
  I'm working on a site and they want to have multiple accounts and admins and users that fit in that paradigm, and I'm not sure the best way to approach it.
  
  So general admins should be able to create new accounts and account admins. Account admins can log in and add products for their account *only*. And then the regular site is locked behind a login so that "regular" users must log in and be associated with an account and can. Both Account Admins and General Admins should be able to create "regular" users (but the former for their accounts only).
  
  I was maybe thinking of associating extra fields to User Groups and trying to go at it in that route. I see you can edit User Profiles with Pro, but I don't see a way to customize User Groups (maybe we don't fully need that, but maybe just let those general admins create User Groups (can this be renamed "Accounts?").
  
  I realize this is a bit of a vague/open ended question. Maybe this isn't really practical in Craft, or will need a lot of custom work...? Or maybe someone has a plugin with this in mind? Just looking for some general help, and this seemed like the place to start!
  
  **Tags:** users, user-groups
  
  > **Comments:**
  > **username_1**: Just a finer note on User Groups and custom fields, while you're pondering your options... Any custom fields which you assign to users will be applied to _all_ user groups equally. Currently there is no way to give different fields to different user groups. Just wanted to give you a heads up, because that's bitten a few people in the past (including me).  
  > **username_0**: I think as users go, it may work out okay because we don't really care about anything other than login for anything other than those "regular" users, so the extra fields I would put on them should be okay to be ignored. But that is good to know and a little unfortunate. Was hoping for finer User/User Group control.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2014-09-23. Score: 1
  
  Not exactly the fine control you're looking for, or ideal by any means, but one direction might be to create an "Account" channel with a related user field for 'User' (required; limit to 1; from userGroup 'Regular User') — or vice-versa (related "Account" entry in "Users").
  
  You can then restrict your Account Admins to only edit 'Accounts' (and Products) entries that belong to them, with all the custom fields that are required.
  
  The problem here is that you wouldn't also want the Account Admin to be able to edit or assign permissions to users (thus defeating the purpose). And there is no way to automatically assign a new user (created through the CP) to a userGroup (as far as I know). Users can however automatically be assigned through the front-end through "allow public registration" and "default user group" settings. So, an Account Admin could technically create a new user through the front-end. And then (back in the CP) create a new 'Account' entry, and relate that account to the user they just created.
  
  They would still require an admin to edit or delete the user, but maybe that's ok.
  
  You would also need checks in place to ensure that only one account was assigned to any one user, somehow. If you reverse the relationship (i.e. related 'Account' entries field in 'Users'; limit 1), then you could ensure the 1-to-1, but this would require an admin to relate the two together.
  
  Admins, of course, could do all of this through the CP and assign the "Account" to the Account Admin, by just setting the author.
  
  Not ideal of course, but perhaps a step in the right direction.
  
  
  ---
  
  