aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/SetupManager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/SetupManager.php')
-rw-r--r--lib/private/Files/SetupManager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index 01ce4a1cc59..2198c8c60b7 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -294,7 +294,7 @@ class SetupManager {
$userRoot = '/' . $user->getUID() . '/';
$mounts = $this->mountManager->getAll();
$mounts = array_filter($mounts, function (IMountPoint $mount) use ($userRoot) {
- return strpos($mount->getMountPoint(), $userRoot) === 0;
+ return str_starts_with($mount->getMountPoint(), $userRoot);
});
$allProviders = array_map(function (IMountProvider $provider) {
return get_class($provider);
@@ -365,7 +365,7 @@ class SetupManager {
* @return IUser|null
*/
private function getUserForPath(string $path) {
- if (strpos($path, '/__groupfolders') === 0) {
+ if (str_starts_with($path, '/__groupfolders')) {
return null;
} elseif (substr_count($path, '/') < 2) {
if ($user = $this->userSession->getUser()) {
@@ -373,7 +373,7 @@ class SetupManager {
} else {
return null;
}
- } elseif (strpos($path, '/appdata_' . \OC_Util::getInstanceId()) === 0 || strpos($path, '/files_external/') === 0) {
+ } elseif (str_starts_with($path, '/appdata_' . \OC_Util::getInstanceId()) || str_starts_with($path, '/files_external/')) {
return null;
} else {
[, $userId] = explode('/', $path);