@Philip - For this exact reason you really have a more elegant way to solve the problem.
1.
There's an extension in Backend -> Extend -> Extensions, called "List form custom webhooks".
Once you enable that, go to your list pages, to the unsubscribe confirm page ( /page/unsubscribe-confirm ).
You will now see you can Add webhooks to this page. A webhook is a URL where mailwizz will make a request with the subscriber info. This request can be either POST or GET, you can set that up.
The last step is for you to write the code from the webhook page to handle the request params and take proper action.
2. With the "List form custom redirect" extension enabled, if you go to the same page of your list as above, you'll notice you can set an url to redirect the subscriber after he unsubscribed and the number of seconds when the redirect happens.
You can then set a redirect like:
http://mywebsite.com/unsubscribed.php?email=&user_id[USER_ID]&custom_field=[CUSTOM_FIELD] then in your unsubscribed.php file you just handle the $_GET vars
Thanks.