Exemple #1
0
 /**
  * Updates a list of senders wich are considered safe to show external images coming from.
  * 
  * @param string $iUserId User identifier.
  * @param string $sEmail Email of sender wich is considered safe.
  * 
  * @return bool
  */
 public function setSafetySender($iUserId, $sEmail)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->getSafetySenderQuery($iUserId, $sEmail))) {
         $oRow = $this->oConnection->GetNextRecord();
         if (!$oRow) {
             $bResult = $this->oConnection->Execute($this->oCommandCreator->insertSafetySenderQuery($iUserId, $sEmail));
         }
         $this->oConnection->FreeResult();
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }