diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-03-28 16:13:19 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-04-04 11:45:22 +0200 |
commit | 0b332ceac24ee93e82e25ee95841ae6fae3b889b (patch) | |
tree | 5c33219f115c05a17cec25e2122ff1cae352e86f /apps/user_ldap/lib/User | |
parent | 292b903bc283c5a7929e092d8262331606461ef7 (diff) | |
download | nextcloud-server-0b332ceac24ee93e82e25ee95841ae6fae3b889b.tar.gz nextcloud-server-0b332ceac24ee93e82e25ee95841ae6fae3b889b.zip |
fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap/lib/User')
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index 3b0015380ec..c3e9895e043 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -244,7 +244,7 @@ class User { ($profileCached === null) && // no cache or TTL not expired !$this->wasRefreshed('profile')) { // check current data - $profileValues = array(); + $profileValues = []; //User Profile Field - Phone number $attr = strtolower($this->connection->ldapAttributePhone); if (!empty($attr)) { // attribute configured @@ -316,7 +316,7 @@ class User { if (str_contains($ldapEntry[$attr][0], '\r')) { // convert line endings $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_BIOGRAPHY] - = str_replace(array("\r\n","\r"), "\n", $ldapEntry[$attr][0]); + = str_replace(["\r\n","\r"], "\n", $ldapEntry[$attr][0]); } else { $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_BIOGRAPHY] = $ldapEntry[$attr][0]; @@ -397,9 +397,9 @@ class User { if ($path !== '') { //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 ('/' !== $path[0] - && !(3 < strlen($path) && ctype_alpha($path[0]) - && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) + if ($path[0] !== '/' + && !(strlen($path) > 3 && ctype_alpha($path[0]) + && $path[1] === ':' && ($path[2] === '\\' || $path[2] === '/')) ) { $path = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data') . '/' . $path; @@ -785,7 +785,7 @@ class User { * @throws \OCP\PreConditionNotMetException * @throws \OC\ServerNotAvailableException */ - public function updateExtStorageHome(string $valueFromLDAP = null):string { + public function updateExtStorageHome(?string $valueFromLDAP = null):string { if ($valueFromLDAP === null) { $extHomeValues = $this->access->readAttribute($this->getDN(), $this->connection->ldapExtStorageHomeAttribute); } else { |