<?php

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

defined('COT_CODE') or die('Wrong URL');

if($item['item_id'] > 0) {
  require_once cot_incfile('mavatars', 'plug');

	$mavatar = new mavatar('certificates', '', $item['item_id'], 'edit');
	$mavatar->delete_all_mavatars();
}