]> source.dussan.org Git - nextcloud-server.git/commitdiff
code styling 37856/head
authorMarc Hefter <marchefter@gmail.com>
Mon, 24 Apr 2023 08:21:45 +0000 (10:21 +0200)
committerMarc Hefter <marchefter@gmail.com>
Mon, 24 Apr 2023 08:21:45 +0000 (10:21 +0200)
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
apps/user_ldap/lib/User/User.php

index c79c2b76f4191aa9bfed6315bde9880cbe0b8315..f85e4206efffbb746df7764a2c79a099ad79bf09 100644 (file)
@@ -286,31 +286,31 @@ class User {
                        $attr = strtolower($this->connection->ldapAttributeTwitter);
                        if (!empty($attr)) {
                                $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_TWITTER]
-                                       = (isset($ldapEntry[$attr]) ? $ldapEntry[$attr][0] : "");
+                                       = $ldapEntry[$attr][0] ?? "";
                        }
                        //User Profile Field - fediverse
                        $attr = strtolower($this->connection->ldapAttributeFediverse);
                        if (!empty($attr)) {
                                $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_FEDIVERSE]
-                                       = (isset($ldapEntry[$attr]) ? $ldapEntry[$attr][0] : "");
+                                       = $ldapEntry[$attr][0] ?? "";
                        }
                        //User Profile Field - organisation
                        $attr = strtolower($this->connection->ldapAttributeOrganisation);
                        if (!empty($attr)) {
                                $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_ORGANISATION]
-                                       = (isset($ldapEntry[$attr]) ? $ldapEntry[$attr][0] : "");
+                                       = $ldapEntry[$attr][0] ?? "";
                        }
                        //User Profile Field - role
                        $attr = strtolower($this->connection->ldapAttributeRole);
                        if (!empty($attr)) {
                                $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_ROLE]
-                                       = (isset($ldapEntry[$attr]) ? $ldapEntry[$attr][0] : "");
+                                       = $ldapEntry[$attr][0] ?? "";
                        }
                        //User Profile Field - headline
                        $attr = strtolower($this->connection->ldapAttributeHeadline);
                        if (!empty($attr)) {
                                $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_HEADLINE]
-                                       = (isset($ldapEntry[$attr]) ? $ldapEntry[$attr][0] : "");
+                                       = $ldapEntry[$attr][0] ?? "";
                        }
                        //User Profile Field - biography
                        $attr = strtolower($this->connection->ldapAttributeBiography);