<?php

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

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

$dsblock = cot_import('ruserdsblock','P','INT');
if($urr['user_dsblock'] == 0 && $dsblock == 1) {
  $ruser['user_dsblock'] = $sys['now'];
} elseif($urr['user_dsblock'] > 0 && $dsblock == 0) {
  $ruser['user_dsblock'] = 0;
}