function deleteUserFeed() { if (!empty($_REQUEST['record'])) { $feed = new SugarFeed(); $feed->retrieve($_REQUEST['record']); if (is_admin($GLOBALS['current_user']) || $feed->created_by == $GLOBALS['current_user']->id) { $feed->mark_deleted($_REQUEST['record']); } } }