File: //opt/proundcontra.mosmuc.de/unfollow.php
<?php
include("commonHeaders.php");
$sTimer->start('unfollowRun');
// Retrieve question ID from request
$qId = $sRequest->getString("qId");
// If user is logged in, proceed to unfollow
if ($sUser->isLoggedIn()) {
$sUser->unfollow($qId);
$sSession->setVal("notification", $sTemplate->getString("NOTICE_UNFOLLOW_SUCCESS"));
$sTimer->start('serialization');
$sSession->serialize();
$sTimer->stop('serialization');
}
$sTimer->stop('unfollowRun');
// Redirect back to homepage
header("Location: /");
exit;