CMS MADE SIMPLE FORGE

Newsletter Made Simple

 

[#5843] Alter unsubscribe method

avatar
Created By: Brett Hemphill (aucomp)
Date Submitted: Tue Dec 14 20:10:02 -0500 2010

Assigned To: Robert Campbell (calguy1000)
Version: 2.3.2
CMSMS Version: None
Severity: Trivial
Resolution: Won't Fix
State: Closed
Summary:
Alter unsubscribe method
Detailed Description:
Currently when a user unsubscribes they are removed from all public lists.

Proposed change is to set them as disabled. This allow for mass imports from
other system that don’t override a decision to unsubscribe. (One of my clients
has a 60,000+ list)

The following code change in action.unsubscribe.php achieves the above

From:
$query = "SELECT A.listid FROM ".NMS_LIST_TABLE." A, ".
  NMS_LISTUSER_TABLE." B WHERE A.listid = B.listid AND A.public = 1 
  AND B.userid = ?";
  
$q2 = "DELETE FROM ".NMS_LISTUSER_TABLE." WHERE userid = ? AND listid = ?";

$dbresult = $db->Execute($query,array($userinfo['userid']));

if( !$dbresult )
  {
    echo $db->ErrorMsg();
    return;
  }
while( $row = $dbresult->FetchRow() )
  {
$dbresult2 = $db->Execute( $q2, array( $userinfo['userid'], $row['listid']
));
  }

To: 

$query = "UPDATE cms_module_nms_users SET disabled = 1 WHERE userid = ?";

$dbresult = $db->Execute($query,array($userinfo['userid']));

if( !$dbresult )
  {
    echo $db->ErrorMsg();
    return;
  }


History

Comments
avatar
Date: 2010-12-14 20:12
Posted By: Brett Hemphill (aucomp)

Just noticed [#5108] Unsubscribe not to ALL lists.

My proposed change does not help this at all. Maybe an option do define
unsubscribe method is needed.
ie. disable or unscribe.

      
Updates

Updated: 2012-04-23 21:37
state: Open => Closed

Updated: 2011-12-15 23:46
resolution_id: 5 => 8
cmsms_version_id: => -1

Updated: 2010-12-14 20:12
resolution_id: => 5