summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorMarc Hefter <marchefter@gmail.com>2023-03-31 11:42:11 +0200
committerMarc Hefter <marchefter@gmail.com>2023-04-06 08:20:31 +0200
commitebb0c53f9e271cc0036c5f5c8d6316722a78b33c (patch)
tree0a8b1eb4fedf6a82b91ad1db2e5a417555d94292 /apps/user_ldap
parent72d0a3f26e41b5edb0521cf61bc87d6c08389ced (diff)
downloadnextcloud-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.php5
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];