mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 12:51:52 +02:00
nicer way to set current Vfs user and also not overwriting the default context
This commit is contained in:
parent
0f376ae6df
commit
5dcc670ac0
@ -61,9 +61,9 @@ trait UserContextTrait
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we have no user set, set the current one / Api\Vfs::$user
|
// if we have no user set, set the current one / Api\Vfs::$user
|
||||||
if (empty(stream_context_get_options($this->context)[Vfs::SCHEME]['user']) && !empty(Api\Vfs::$user))
|
if (empty($this->user) && !empty(Api\Vfs::$user))
|
||||||
{
|
{
|
||||||
stream_context_set_option($this->context, [Vfs::SCHEME => ['user' => Api\Vfs::$user]]);
|
$this->user = Api\Vfs::$user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user