Skip to content

Commit

Permalink
trying to make github-code-scanning bot happy
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Hefter <marchefter@gmail.com>
  • Loading branch information
march42 committed Mar 31, 2023
1 parent 419bd78 commit 8e18632
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/user_ldap/lib/User/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,11 @@ public function processAttributes($ldapEntry) {
//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];
Expand Down

0 comments on commit 8e18632

Please sign in to comment.