'asubscribe' POST overwrites/updates existing information : how to change that?

Hello !

In my custom subscribe form, I’m using AJAX subscribe “?p=asubscribe&id=X” POST method.
But if I enter an email which already exists in the PHPList database, the existing details are automatically overwritten with the informations given by my form… and I don’t want this… I would prefer that the “asubscribe” request fails and returns an explicit error message like “this email is already in our database”…

How can I do this ? Is that possible ? I had a look in the admin/subscribelib2.php file but this is too complex for me to understand myself what I should modify (IF I should modify this file !)…

Many thanks for your help !


ps. I’m using PHPList 3.0.12.

Hi, new API due in next few months, might be worth waiting till then, this issue must be uncommon, so probably okay to wait.

There is a config file setting for whether to allow a duplicate subscription or not.
See https://resources.phplist.com/system/config/silent_resubscribe

1 Like

Thanks a lot !! I set it to false and it works perfectly :slight_smile: Wonderful :smile: