function subs_subscribe_to($user, $other)
{
+ if (!$user->hasRight(Right::SUBSCRIBE)) {
+ return _('You have been banned from subscribing.');
+ }
+
if ($user->isSubscribed($other)) {
- return _('Already subscribed!.');
+ return _('Already subscribed!');
}
if ($other->hasBlocked($user)) {
function subs_unsubscribe_to($user, $other)
{
if (!$user->isSubscribed($other))
- return _('Not subscribed!.');
+ return _('Not subscribed!');
+
+ // Don't allow deleting self subs
+
+ if ($user->id == $other->id) {
+ return _('Couldn\'t delete self-subscription.');
+ }
$sub = DB_DataObject::factory('subscription');