7 posts by 3 authors in: Forums > CMS Builder
Last Post: January 6, 2018   (RSS)

In response to: [url "https://www.interactivetools.com/forum/forum-posts.php?postNum=2240158#post2240158"]Making a bulk change to User Account Passwords[/url], ...

Hi Ross, The CSV import worked great! I exported a sample user account to work from. I had to change the dates to DateTime format yyyy-mm-dd hh:mm:ss in Excel then exported to CSV for export. 

The only thing I can't figure out is how to set the user permissions.(screenshot attached)
Can that be done through a different table in the db? 

Thanks! Tina

Hi csdesign, 

Yes, it's stored in a table called '_accessList', you can see it here: admin.php?menu=database&action=editTable&tableName=_accessList

You'd have to import into that table or use MySQL to insert/update the entries.

Hope that helps!

Dave Edis - Senior Developer

Thank you guys very much! I'll try out the plugin and if for some reason I need to, then I'll try it manually. Access List didn't come up on my list of Tables on the Import CMS plugin. 

Is it at all possible to split the non-administrators into two groups?  I believe I asked before about dividing users into two different User Account groups - and it wasn't possible. Not sure if the same situation applies to this plugin. 

For instance, Half of the group I need to give access to add/edit horses only, the other half I need to give access to add/edit mules only.  (screenshot attached). 

Thanks! Tina

Hi Tina, 

It doesn't do that by default, no.  You'd have to how you were going to identify the two groups and what MySQL WHERE query would select them.

In the plugin there's the following code: 

  /* Check for selected group of users and make the where condition
    1 - all
    2 - administrators
    3 - non administrators
  if(@$_REQUEST['userGroup'] == 1) {
    $accountsQueryWhere = "num";
  elseif(@$_REQUEST['userGroup'] == 2) {
    $accountsQueryWhere = "isAdmin = 1";
  elseif(@$_REQUEST['userGroup'] == 3) {
    $accountsQueryWhere = "isAdmin = 0";
  else {
    alert("Invalid user group.");

If you (backup first!) temporarily changed the value of non-admins (3) to say "isAdmin = 0 AND otherField = 1" then you could further filter the users.

It would probably take some trial and error.

Hope that helps and good luck!

Dave Edis - Senior Developer

Sounds good, thank you!  I will backup then hack away at it!! ;) 

I do have a radio button that defines each of them at the beginning of each user account (attached image). If I can use that, then that will work great because they are already defined there. 

Thanks again! Tina