poll_user_cancel

Versions
7
poll_user_cancel($edit, $account, $method)

Implements hook_user_cancel().

Code

modules/poll/poll.module, line 887

<?php
function poll_user_cancel($edit, $account, $method) {
  switch ($method) {
    case 'user_cancel_reassign':
      db_update('poll_vote')
        ->fields(array('uid' => 0))
        ->condition('uid', $account->uid)
        ->execute();
      break;

    case 'user_cancel_delete':
      db_delete('poll_vote')
        ->condition('uid', $account->uid)
        ->execute();
      break;
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.