示例#1
0
 /**
  * Filter the query by a related User object
  *
  * @param   User|PropelObjectCollection $user  the related object to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   ContactQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterByUser($user, $comparison = null)
 {
     if ($user instanceof User) {
         return $this->addUsingAlias(ContactPeer::ID, $user->getContactId(), $comparison);
     } elseif ($user instanceof PropelObjectCollection) {
         return $this->useUserQuery()->filterByPrimaryKeys($user->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByUser() only accepts arguments of type User or PropelCollection');
     }
 }
示例#2
0
$background_color = 'white';
include_once 'config.php';
include_once 'includes/ofuz_check_access.script.inc.php';
$Parsedown = new Parsedown();
/*include_once("class/Feed.class.php");*/
if (isset($_GET['id'])) {
    $idcontact = $_GET['id'];
} elseif (is_object($_SESSION["eDetail_contact"])) {
    $idcontact = $_SESSION["eDetail_contact"]->getparam("idcontact");
} elseif ($do_contact->idcontact) {
    $idcontact = $do_contact->idcontact;
} elseif (is_object($_SESSION['ContactEditSave'])) {
    $idcontact = $_SESSION['ContactEditSave']->idcontact;
}
$do_user = new User();
$current_idcontact = $do_user->getContactId($_SESSION["do_User"]->iduser);
/*if($current_idcontact != $idcontact){
    if(isset($_SESSION['edit_from_page'])) {
        unset($_SESSION['edit_from_page']);
    }
  }else{*/
$_SESSION['edit_from_page'] = 'Contact/' . $idcontact;
//}
/* Contacts Note sharing Object 
 */
if (!is_object($_SESSION['do_cont'])) {
    $do_cont = new Contact();
    $do_cont->sessionPersistent("do_cont", "index.php", OFUZ_TTL);
    $_SESSION['do_cont']->idcontact = $idcontact;
} else {
    $_SESSION['do_cont']->idcontact = $idcontact;