From 7665af52e8726fdcdae5ff6669f1459806d0350e Mon Sep 17 00:00:00 2001 From: Malik <3097625+dermalikmann@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:11:44 +0200 Subject: [PATCH] style(PHP): fix code style Signed-off-by: Malik <3097625+dermalikmann@users.noreply.github.com> --- lib/UserBackend.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/UserBackend.php b/lib/UserBackend.php index 35835829..8a179be6 100644 --- a/lib/UserBackend.php +++ b/lib/UserBackend.php @@ -138,9 +138,9 @@ public function createUserIfNotExists(string $uid, array $attributes = []): void if ($home !== '') { //if attribute's value is an absolute path take this, otherwise append it to data dir //check for / at the beginning or pattern c:\ resp. c:/ - if ('/' !== $home[0] - && !(3 < strlen($home) && ctype_alpha($home[0]) - && $home[1] === ':' && ('\\' === $home[2] || '/' === $home[2])) + if ($home[0] !== '/' + && !(strlen($home) > 3 && ctype_alpha($home[0]) + && $home[1] === ':' && ($home[2] === '\\' || $home[2] === '/')) ) { $home = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data') . '/' . $home;