CleanUp: remove unneeded UNSET, to unclutter code

Signed-off-by: march42 <marchefter@gmail.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
This commit is contained in:
Marc Hefter 2023-02-14 11:56:51 +01:00 committed by Marc Hefter
parent 240c57b94b
commit 26aa1c3580
No known key found for this signature in database
GPG key ID: AC45BA6A849F8610

View file

@ -255,43 +255,36 @@ class User {
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_PHONE, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - website
$attr = strtolower($this->connection->ldapAttributeWebsite);
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_WEBSITE, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - Address
$attr = strtolower($this->connection->ldapAttributeAddress);
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_ADDRESS, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - Twitter
$attr = strtolower($this->connection->ldapAttributeTwitter);
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_TWITTER, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - organisation
$attr = strtolower($this->connection->ldapAttributeOrganisation);
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_ORGANISATION, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - role
$attr = strtolower($this->connection->ldapAttributeRole);
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_ROLE, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - headline
$attr = strtolower($this->connection->ldapAttributeHeadline);
if (isset($ldapEntry[$attr])) {
$this->updateProfile(self::USER_PREFKEY_HEADLINE, $ldapEntry[$attr][0], $profileScope);
}
unset($attr);
//User Profile Field - biography
$attr = strtolower($this->connection->ldapAttributeBiography);
if (isset($ldapEntry[$attr])) {