/[drupal]/contributions/modules/simplenews/simplenews.module
ViewVC logotype

Diff of /contributions/modules/simplenews/simplenews.module

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

revision 1.112, Mon Jun 30 06:24:27 2008 UTC revision 1.113, Tue Jul 1 07:56:37 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: simplenews.module,v 1.111 2008/06/30 05:15:53 sutharsan Exp $  // $Id: simplenews.module,v 1.112 2008/06/30 06:24:27 sutharsan Exp $
3    
4  /**  /**
5   * @defgroup simplenews   * @defgroup simplenews
# Line 613  function simplenews_user($op, &$edit, &$ Line 613  function simplenews_user($op, &$edit, &$
613        break;        break;
614      case 'delete':      case 'delete':
615        if (variable_get('simplenews_sync_account', TRUE)) {        if (variable_get('simplenews_sync_account', TRUE)) {
616          // Delete subscription and all newsletter subscriptions when account is removed          // Delete subscription and all newsletter subscriptions when account is removed.
617          $subscription = simplenews_get_subscription($account);          // We don't use simplenews_get_subscription() here because the user is already
618          db_query('DELETE FROM {simplenews_snid_tid} WHERE snid = %d', $subscription->snid);          // deleted from the {user} table.
619          db_query('DELETE FROM {simplenews_subscriptions} WHERE snid = %d', $subscription->snid);          $snid = db_result(db_query("SELECT s.snid FROM {simplenews_subscriptions} s WHERE s.mail = '%s'", $account->mail));
620            db_query('DELETE FROM {simplenews_snid_tid} WHERE snid = %d', $snid);
621            db_query('DELETE FROM {simplenews_subscriptions} WHERE snid = %d', $snid);
622        }        }
623        else {        else {
624          // Only remove uid from subscription data when account is removed          // Only remove uid from subscription data when account is removed

Legend:
Removed from v.1.112  
changed lines
  Added in v.1.113

  ViewVC Help
Powered by ViewVC 1.1.2