--
You received this message because you are subscribed to a topic in the Google Groups "SabreDAV Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sabredav-discuss/3LovqGsfZ00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sabredav-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sabredav-discuss/9393ef87-6f31-4615-9661-796de6d08977%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Found a possible solution:useSabre\HTTP\Sapi,Sabre\HTTP\Response,Sabre\HTTP\Auth;$request = Sapi::getRequest();$response = new Response();$basicAuth = new Auth\Basic("Locked down area", $request, $response);$basicAuth->requireLogin();$user = $basicAuth->getCredentials();$username = $user[0];$password = $user[1];Put that at the beginning of your script so you can set the proper path to each user directory.
2014-12-01 11:38 GMT+01:00 paranerd <paranerd.development@gmail.com>:
Currently having the same issue...This is what I got:$path = "";$authBackend = new Sabre\DAV\Auth\Backend\BasicCallBack(function($userName, $password) {if(login($userName, $password)) {$path = $dataDir . $userName;return true;}return false;});$root = new \Sabre\DAV\FS\Directory($path);[..]The problem is, that the "$root"-part gets called BEFORE the "$authBackend"-Part, so I get an error, that the $path can not be empty =/Is there a "getUser()"-function or a way to get the functions to be called in the "right" order?Thanks in advance.Am Samstag, 29. November 2014 17:55:29 UTC+1 schrieb Bailey Rud:Hello,I currently develop an application with a webdav-server. Each user have their own home directory with their files. My webdav-server (based on SabreDAV) runs with authentication, but i don't know how to use the username of the authentication for the direcory. For example: when the user "test2" logins, the directory in webdav should be "/files/test2/".Is this possible? When yes, how can i realize that in PHP?Thank you for your help and sorry for my bad english (i'm from germany),Bailey
--
You received this message because you are subscribed to a topic in the Google Groups "SabreDAV Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sabredav-discuss/3LovqGsfZ00/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sabredav-discuss+unsubscribe@googlegroups.com.
Hi everyone,
I wrote new docs for this. It takes the previous threads and goes into a lot more detail on how to solve this issue.
It's possible that it's vague in some areas, so I would also love to hear if there are bits you don't understand/I didn't explain well enough.