As from KFM 1.4 there are more options for user management. KFM wants to support extension to CMS system as a main tool. Therefore user management in KFM should be an extension to an already existing user management. But it is not as simple as that. To be really flexible KFM should be able to behave tailored on a per user basis. To solve this issue and to be able to function as a stand alone file manager as well, KFM 1.4 has its own user management system. The first, basic always active user is the default user with user_id = 1. If KFM should run with only one built in userprofile this is the one to use.
Here an example where some CMS assumptions are put in. Using KFM as filemanager for a CMS should be really easy. I assume that there is a authentication or initialisation script that initializes the CMS. Include this in the KFM configuration.php.
<?php require 'my_cms_initialization.php'; # This should result in a $cms object;
You probably want to use your own security, so set
$use_kfm_security = false;
If you set all the other configuration parameters as described by the installation manual according to your CMS wishes, it should work.
To configure your default options please visit the KFM_URL/admin/ where the KFM_URL is your url to the KFM installation. Here you can create your settings profile graphically. If you are satisfied with the settings, please make sure that you have a function in your configuration.php that is:
function kfm_admin_check(){return false;}
unless you want to grant your users the possibility to access the admin panel on their own.
If you based on you own chosen logic want to update settings for users you can use two methods, assign on a per setting basis:
$kfm->setting('allow_file_delete', false);
Or using a bulk method:
$kfm->setSettings(array( 'allow_file_upload' => false, 'allow_file_delete' => false ));
Note that this works from KFM 4.5 and later.
This is a basic implementation. If you want your users to be able to change some of their settings using the KFM admin panel you should create users in KFM. The howto of this will be given next time.