You are here

function uc_order_update_7300 in Ubercart 7.3

Delete unwanted sensitive data.

File

uc_order/uc_order.install, line 879
Install, update and uninstall functions for the uc_order module.

Code

function uc_order_update_7300() {
  $result = db_query("SELECT order_id, data FROM {uc_orders} WHERE data LIKE '%s:4:\"pass\"%'");
  while ($row = $result
    ->fetchObject()) {
    $data = unserialize($row->data);
    if (isset($data['new_user']['pass'])) {
      unset($data['new_user']['pass']);
      db_update('uc_orders')
        ->fields(array(
        'data' => serialize($data),
      ))
        ->condition('order_id', $row->order_id)
        ->execute();
    }
  }
  variable_del('uc_order_cron_last');
}