mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
Add functionality to SMB share
With this change it's possible to use the variable "[USER]" when creating an external storage for users. This variable is replaced by the name of the user. In this way, with a single share, we share each one's personal folder only for that user.
This commit is contained in:
parent
065daa49cb
commit
ff05d2e86e
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ class NativeShare extends AbstractShare {
|
||||||
|
|
||||||
private function buildUrl($path) {
|
private function buildUrl($path) {
|
||||||
$this->verifyPath($path);
|
$this->verifyPath($path);
|
||||||
$url = sprintf('smb://%s/%s', $this->server->getHost(), $this->name);
|
$url = str_replace('[USER]', $this->server->getAuth()->getUserName(), sprintf('smb://%s/%s', $this->server->getHost(), $this->name));
|
||||||
if ($path) {
|
if ($path) {
|
||||||
$path = trim($path, '/');
|
$path = trim($path, '/');
|
||||||
$url .= '/';
|
$url .= '/';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue