File Thingie • PHP File Manager

Setting up additional users and groups

File Thingie supports multiple users and you can assign users to groups with specific settings. This allows you to give a group of people access to their own directory while not being able to access the files of the other group members. You set up additional users in the section below the colour section. By default additional users have been rendered inactive and you will need to remove the comments surrounding the section. Thus:

/*
$ft['users']['REPLACE_WITH_USERNAME'] = array(
  'password' => 'REPLACE_WITH_PASSWORD', 
  'group' => 'REPLACE_WITH_GROUPNAME'
);
*/

Should be changed to:

$ft['users']['REPLACE_WITH_USERNAME'] = array(
  'password' => 'REPLACE_WITH_PASSWORD', 
  'group' => 'REPLACE_WITH_GROUPNAME'
);

Then you can set up additional users by editing those lines of code. You can add additional users by copying those 4 lines more than once. E.g. if you want to give access to the users "alfred" (with password "hitchcock") and the user "steven" (with password "soderbergh"), both belonging to the group "hollywood", you would have the section read:


$ft['users']['alfred'] = array(
  'password' => 'hitchcock', 
  'group' => 'hollywood'
);
$ft['users']['steven'] = array(
  'password' => 'soderbergh', 
  'group' => 'hollywood'
);

The section for groups is located just below the user section and has a similar format. Again you need to remove the comments around the section so:

/*
$ft['groups']['REPLACE_WITH_GROUPNAME'] = array(
  'DIR' => 'REPLACE_WITH_CUSTOM_DIR', 
);
*/

Becomes:

$ft['groups']['REPLACE_WITH_GROUPNAME'] = array(
  'DIR' => 'REPLACE_WITH_CUSTOM_DIR', 
);

You can include any of File Thingie's settings to the group and you can add more groups by by copying those 3 lines more than once. E.g. if you want to create one group called "hollywood" with read-only access and another called "indie" with upload access (both using the same directory) you would have the section read:

$ft['groups']['hollywood'] = array(
  'DIR' => 'movies', 
  'UPLOAD' => FALSE,
  'FILEACTIONS' => FALSE
);
$ft['groups']['indie'] = array(
  'DIR' => 'movies', 
  'UPLOAD' => TRUE,
  'FILEACTIONS' => FALSE
);

It's even possible to enable plugins only for a single group. Just add the plugin settings to the group settings. For example if you want to turn the search and edit plugins for the above "indie" group:

$ft['groups']['indie'] = array(
  'DIR' => 'movies', 
  'UPLOAD' => TRUE,
  'FILEACTIONS' => TRUE,
  'plugins' => array(
  	'search' => TRUE,
  	'edit' => array(
  	  'settings' => array(
  	    'editlist' => 'txt html htm css',
  	    'converttabs' => TRUE,
  	  ),
  	),
  ),
);