Adding records using SQL to create new user/password

5 posts by 2 authors in: Forums > CMS Builder
Last Post: May 10, 2010   (RSS)

By rcrofoot - May 2, 2010

Hello-

Using CMS Builder v2.01:

I have a section editor named "Bulletin Board" and have created 2 users, each with their own usernames and passwords...Each has been give the "Author" access level...

In MyPHPAdmin I can see the new table "bulletin_board" , and in the cms_accounts table I can see the 2 new users and their related data...There is also a table called cms_accesslist, which I suspect holds metadata for the 2 users mentioned above, e.g. access level, etc....

So my question is: From a text file of existing username/password pairs, and using PHP, do you have a recommended procedure to create new records for each user in the cms_accounts tables, and also update the cms_accesslist table...Updating the first table (cms_accounts) is relatively straight forward...It's cms_accesslist that seems a little trickier, and that I'm concerned about...

Thanks...Your suggestions are greatly appreciated...Rick

Re: [rcrofoot] Adding records using SQL to create new user/password

By Jason - May 3, 2010

Hi,

How many users are in your text file? CMS Builder automatically creates entries in cms__accesslist. It assigns 1 record for each user, for each table they are given access to (unless they are given access to all).

If there are not too many records, it may be easier to manually assign access after the accounts records have been created.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Adding records using SQL to create new user/password

By rcrofoot - May 3, 2010

Hi Jason-
My client has a text file of user names & passwords that are updated on a daily basis from an external database...It consists of approx. 800 names/passwords...Each of these users needs to be registered in cms builder so they can post their own material when necessary...So, I thought that re-writing the main table (section editor), and then updating the cms_accesslist using sql would be the way to go...I'm confident that would work, but wondered if you have any recommendations or snags you can alert me to...Also, not sure where the value for randomSaveId field in cms_access table is coming from...Is it getting automatically generated as a unique value...And what is it used for...
Thanks, Rick

Re: [Jason] Adding records using SQL to create new user/password

By rcrofoot - May 10, 2010

Thank you, Jason...

That's exactly what I needed info about...

Rick