diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php
index 1f1330839..512e1fd64 100644
--- a/cis/private/profile/index.php
+++ b/cis/private/profile/index.php
@@ -274,7 +274,7 @@ if (!$ansicht)
if (!$ansicht)
{
- if ($is_employee)
+ if ($type === 'mitarbeiter')
{
$verwendung = new bisverwendung();
if($verwendung->getLastVerwendung($uid))
@@ -293,9 +293,35 @@ if (!$ansicht)
$adresse = new adresse();
$adresse->load_pers($user->person_id);
- foreach($adresse->result as $a)
+ if ($type === 'mitarbeiter')
{
- echo $a->strasse . " (" . $a->bezeichnung_mehrsprachig[$sprache] .") " . "
".$a->plz." ".$a->ort."
";
+ foreach ($adresse->result as $a)
+ {
+ echo $a->strasse . " (" . $a->bezeichnung_mehrsprachig[$sprache] . ") " . "
" . $a->plz . " " . $a->ort . "
";
+ }
+ }
+ else
+ {
+ function sortAdresse($a , $b)
+ {
+ if ($a->typ === $b->typ)
+ return 0;
+
+ return ($a->typ < $b->typ) ? -1 : 1;
+ }
+ usort($adresse->result, "sortAdresse");
+
+ foreach($adresse->result as $a)
+ {
+ if ($a->zustelladresse)
+ {
+ if ($a->bezeichnung_mehrsprachig[$sprache] !== NULL)
+ {
+ echo "".$a->bezeichnung_mehrsprachig[$sprache].":
";
+ echo $a->strasse."
".$a->plz." ".$a->ort."
";
+ }
+ }
+ }
}
}