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 the Google Groups
"SabreDAV Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
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.