You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't forget to redefined the auth() function, see example below:
functionauth() {
// You can insert your own code over here to check if the user is authorised.if(isset($_SESSION['isAllowed'])) returntrue;
returnfalse;
}
Note that if serverRoot is set to true in "filemanager.config.json". $_SERVER['DOCUMENT_ROOT'] will be added automatically to the given var.
Then, open your "scripts/filemanager.config.json", and make sure the fileRoot is set to '/';
that's all!
Note that you may use baseUrl to retrieve the right path to files, see also issue #339.
With version <= 0.8
Go to the file where you are calling the script from and create your user session (unique id or name), and store in a session, eg. $_SESSION['userfoldername']
Open your connection file, for example: filemanager.config.php and find the line that looks like: $config['doc_root'] = $_SERVER['DOCUMENT_ROOT'] . 'assets/userfiles/user1';
Now, 'user1' should be flexible, so replace above line with something like the following:
$config['doc_root'] = $_SERVER['DOCUMENT_ROOT'] . '/assets/userfiles/' . $_SESSION['userfoldername'];
Then, open your scripts/filemanager.config.js, and make sure the fileRoot looks like:
var fileRoot = '/';