<?php

/* ====================
  [BEGIN_COT_EXT]
 * Hooks=users.edit.update.delete
  [END_COT_EXT]
  ==================== */


defined('COT_CODE') or die('Wrong URL');
require_once cot_incfile('portfolio', 'module');

$extpl = cot_getextplugins('portfolio.users.edit.update.delete');
$certsql = $db->query("SELECT * FROM $db_portfolio WHERE item_userid=".$urr['user_id'])->fetchAll();

foreach($certsql as $item) {
  /* === Hook === */
  foreach ($extpl as $pl)
  {
  	include $pl;
  }
  /* ===== */

  $db->delete($db_portfolio, "item_id='" . $item['item_id'] . "'");
}