Is there a method for creating user specific directories under userfiles that are accessed ONLY by that user? I am trying to pass the user name to the config file so that the dir variable is set to /userfiles/<username> Since I can not send a session variable to the config file there seems to be no way to do this.
If anyone knows another way to accomplish what I am wanting, please let me know.
Thanks in advance for the help.
If anyone knows another way to accomplish what I am wanting, please let me know.
Thanks in advance for the help.
Re: CKFinder: Are User Specific Directories Possible?
Theoretically, if you really can't use session variables, you could assign an ID to CKFinder which could work as a token (ID is passed to the connector) - it should be hard to guess and regenerated each time user logs in. In config.xxx you would have write code that translates this ID into server path.
Which version of CKFinder are you using?
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Are Dynamically Created User Specific Directories Possible?
I have had trouble getting the start_session to actually store the variables I want... and I think it has to do with how postnuke works... I need to have access to the session inside of the config file.
I am using the latest version of CKFinder.
Any thoughts? Thanks in advance for the help.
P.S. I've changed the subject title of my post to help everyone understand more clearly what it is about.
Re: Are Dynamically Created User Specific Directories Possible?
I have never used Postnuke, however I believe it must use some kind of session management system. session_start() works fine most of the time, however maybe you need to execute some special code first to have access to session variables and session_start() is not enough.
I've took a look at the source code of PostNuke and there is a SesionUtil.class.php in the includes directory which probably does some magic to protest session variables as much as possible, try asking on PostNuke forums how to access session variables from another directory.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Are Dynamically Created User Specific Directories Possible?
Re: Are Dynamically Created User Specific Directories Possible?
On the left side of the CKFinder interface, you have a set of folders ("resource types"), their definition looks more or less like this one:
Note that by default, in the definition of each resource type, two helper variables are used: $baseDir and $baseUrl.
So, to point each resource type into different root folder, you can either change the 'url' and 'directory' attribute, or change the $baseXyz variables.
CKFinder does not remember these values in any way - CKFinder loads the configuration file each time a command is executed (upload file, load files/folders etc.) and if any of the variables used to construct $baseDir or $baseUrl has changed, CFKinder will use the new value.
In your specific case, you should create the $baseUrl/$baseDir variables based on some other variable that is changed whenever user change his account.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+