Skip to content

Commit

Permalink
User: Fix Error On Second E-Mail = Null
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Sep 30, 2024
1 parent adf0eb2 commit 33d408c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Services/User/classes/class.ilObjUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3085,10 +3085,11 @@ public function getProfileAsString(ilLanguage $language): string
if (strlen($this->getFax())) {
$body .= ($language->txt("fax") . ": " . $this->getFax() . "\n");
}
if (strlen($this->getEmail())) {
if ($this->getEmail() !== '') {
$body .= ($language->txt("email") . ": " . $this->getEmail() . "\n");
}
if (strlen($this->getSecondEmail())) {
if ($this->getSecondEmail() !== null
&& $this->getSecondEmail() !== '') {
$body .= ($language->txt("second_email") . ": " . $this->getSecondEmail() . "\n");
}
if (strlen($this->getHobby())) {
Expand Down

0 comments on commit 33d408c

Please sign in to comment.