diff options
author | Marc Hefter <marchefter@gmail.com> | 2023-03-31 11:42:11 +0200 |
---|---|---|
committer | Marc Hefter <marchefter@gmail.com> | 2023-04-06 08:20:31 +0200 |
commit | ebb0c53f9e271cc0036c5f5c8d6316722a78b33c (patch) | |
tree | 0a8b1eb4fedf6a82b91ad1db2e5a417555d94292 /apps/user_ldap | |
parent | 72d0a3f26e41b5edb0521cf61bc87d6c08389ced (diff) | |
download | nextcloud-server-ebb0c53f9e271cc0036c5f5c8d6316722a78b33c.tar.gz nextcloud-server-ebb0c53f9e271cc0036c5f5c8d6316722a78b33c.zip |
trying to make github-code-scanning bot happy
Signed-off-by: Marc Hefter <marchefter@gmail.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index 6c38cba7039..f6a2d037ea7 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -250,10 +250,11 @@ class User { //User Profile Field - website $attr = strtolower($this->connection->ldapAttributeWebsite); if (isset($ldapEntry[$attr])) { - if (str_contains($ldapEntry[$attr][0],' ')) { + $cutPosition = strpos($ldapEntry[$attr][0]," "); + if ($cutPosition) { // drop appended label $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_WEBSITE] - = substr($ldapEntry[$attr][0],0,strpos($ldapEntry[$attr][0]," ")); + = substr($ldapEntry[$attr][0],0,$cutPosition); } else { $profileValues[\OCP\Accounts\IAccountManager::PROPERTY_WEBSITE] = $ldapEntry[$attr][0]; |