diff --git a/views/tpls/forms/sommom/organisme.php b/views/tpls/forms/sommom/organisme.php index 5bd7d545befdc0479cbc81898aad20dca5419423..235c6d1d151d9089686c14b0fb80c7c414e9d6af 100644 --- a/views/tpls/forms/sommom/organisme.php +++ b/views/tpls/forms/sommom/organisme.php @@ -20,9 +20,10 @@ } } - if (isset($this->costum["contextType"]) and isset($this->costum["contextId"])) { - - $communityLinks = Element::getByTypeAndId($this->costum["contextType"],$this->costum["contextId"]); + if (isset($this->costum["contextId"])) { + //$communityLinks = Element::getByTypeAndId($this->costum["contextType"],$this->costum["contextId"]); + $communityLinks = Organization::getById($this->costum["contextId"]); + } @@ -30,6 +31,7 @@ if (isset($communityLinks["links"]["members"])) { foreach ($communityLinks["links"]["members"] as $memberId => $memberValue) { if(isset(Yii::app()->session["userId"])){ + var_dump(Yii::app()->session["userId"]); if($memberId != ""){ if($memberId == Yii::app()->session["userId"]){ if(isset($memberValue["roles"])){ @@ -163,7 +165,7 @@ foreach ($properties as $i => $inp) { if (isset($inp["label"])){ if ($inp["label"] == "contact") { - if($canEditForm || $partenaire){ + if($adminStatus or $partenaire){ echo "".$inp["label"].""; } } else { @@ -184,7 +186,7 @@ echo ""; foreach ($properties as $i => $inp) { if($i == "contact"){ - if($canEditForm || $partenaire){ + if($adminStatus || $partenaire){ echo "".$a[$i].""; } }