Exemplo n.º 1
0
 /**
  * Function remove
  * access public
  */
 function remove($sUID)
 {
     $oConnection = Propel::getConnection(AuthenticationSourcePeer::DATABASE_NAME);
     try {
         $oAuthenticationSource = AuthenticationSourcePeer::retrieveByPK($sUID);
         if (!is_null($oAuthenticationSource)) {
             $oConnection->begin();
             $iResult = $oAuthenticationSource->delete();
             $oConnection->commit();
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
 /**
  * Function remove
  * access public
  */
 function remove($sUID)
 {
     $oConnection = Propel::getConnection(AuthenticationSourcePeer::DATABASE_NAME);
     try {
         $oAuthenticationSource = AuthenticationSourcePeer::retrieveByPK($sUID);
         $authenticationSource = $this->load($sUID);
         if (!is_null($oAuthenticationSource)) {
             $oConnection->begin();
             $iResult = $oAuthenticationSource->delete();
             $oConnection->commit();
             G::auditLog("DeleteAuthSource", "Authentication Source Name: " . $authenticationSource['AUTH_SOURCE_NAME'] . " Authentication Source ID: (" . $sUID . ") ");
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }