summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
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];