/[drupal]/drupal/modules/poll/poll.module
ViewVC logotype

Diff of /drupal/modules/poll/poll.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.283 by dries, Wed Dec 31 12:02:23 2008 UTC revision 1.284 by webchick, Thu Jan 8 08:42:12 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: poll.module,v 1.282 2008/12/18 14:38:37 dries Exp $  // $Id: poll.module,v 1.283 2008/12/31 12:02:23 dries Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 815  function poll_cancel($form, &$form_state Line 815  function poll_cancel($form, &$form_state
815  }  }
816    
817  /**  /**
818   * Implementation of hook_user_delete().   * Implementation of hook_user_cancel().
819   */   */
820  function poll_user_delete(&$edit, &$user) {  function poll_user_cancel(&$edit, &$account, $method) {
821    db_query('UPDATE {poll_vote} SET uid = 0 WHERE uid = %d', $user->uid);    switch ($method) {
822        case 'user_cancel_reassign':
823          db_update('poll_vote')->fields(array('uid' => 0))->condition('uid', $account->uid)->execute();
824          break;
825    
826        case 'user_cancel_delete':
827          db_delete('poll_vote')->condition('uid', $account->uid)->execute();
828          break;
829      }
830  }  }
831    

Legend:
Removed from v.1.283  
changed lines
  Added in v.1.284

  ViewVC Help
Powered by ViewVC 1.1.3