Two Separate User Accounts Section Editors

By Steve99 - April 15, 2011

I have used the CMS Membership Plug-in for the first time on our current web build.

I just have one question:

It is set up to place all users in the main user accounts table. My desire is to use two separate section editors to play off that same table. One of which will be the controller of all regular end users, the other will be the controller of all admin level users.

Edited manually, I currently have each user account ini file set for different required fields since the end users captures more information. This works fine, but I would like to only pull in the Admin records to the Admin User Accounts editor, and the regular end users into the regular User Accounts editor.

I know I could accomplish this by checking to see if "isAdmin" is 1 or 0, I just don't know where in the code or editor options to set this.

Thanks in advance!

Re: [steve99] Two Separate User Accounts Section Editors

By robin - April 15, 2011

Hey Steve,

So you have two schema .ini files that pull from the same table, could you mail them into support so we can take a look?

Usually if you want to have two different editors for the same table you'll need to create the form outside of CMS Builder.

Perhaps this free plugin could help you too:
http://www.interactivetools.com/add-ons/detail.php?Show-Hide-Fields-For-Users-1036

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [steve99] Two Separate User Accounts Section Editors

By robin - April 18, 2011

Hey Steve,

I think if you copied and renamed a schema, then you actually have two tables. The CMS would have created a new table with the name of your copied schema.

If you want to try your hand a coding a plugin then yes, the isAdmin variable is what you would use. You can check out the free plugins for examples on how to modify forms.

If you can wait, the best solution for you might be to wait for CMS Builder 2.08 which is in beta right now. It will have the ability to define fields as editable by admins, but not editors.

http://www.interactivetools.com/forum/gforum.cgi?post=87368#87368

Robin
Robin
Programmer
interactivetools.com

Re: [robin] Two Separate User Accounts Section Editors

By Steve99 - April 18, 2011

The CMS actually did not create a new table when I duplicated the schema file manually (verified by checking our database). The CMS actually was using both user account schema .ini files off the same table.

I'm not in a super rush since the individual acting as their main website editor and has access to all CMS areas has IT experience and was told not to touch specific credentials. I just wanted to set it up to be fool proof.

Just to confirm, there is no way within the schema .ini file itself to filter records based on the isAdmin value - correct? And to accomplish this I would need to create my own plug-in.

Thanks again, Robin.

Re: [steve99] Two Separate User Accounts Section Editors

By robin - April 18, 2011

Hey Steve,

Yes that's right, you cant filter records in a schema file. The schema file is not referenced when you view a record, you would need a plugin. The new access features in 2.08 sounds like exactly what you need though.

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Two Separate User Accounts Section Editors

By Steve99 - April 18, 2011

Hey Robin,
Okay, perfect. I'll just hang tight for version 2.08 to be out of beta and update this installation instance.

Thank you for your assistance.