diff options
Diffstat (limited to 'actions/subscribe.php')
-rw-r--r-- | actions/subscribe.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actions/subscribe.php b/actions/subscribe.php index 4edf3e714..ea3038236 100644 --- a/actions/subscribe.php +++ b/actions/subscribe.php @@ -49,6 +49,14 @@ class SubscribeAction extends Action { $sub->subscribed = $other->id; $sub->created = DB_DataObject_Cast::dateTime(); # current time + + $val = $sub->validate(); + + if ($val !== TRUE) { + # XXX: give some error notice + common_server_error(_t('Subscription did not validate.')); + return; + } if (!$sub->insert()) { common_server_error(_t('Couldn\'t create subscription.')); |