function createSubscriptionUser($attributes) { $param = array('parent_node_id' => JAJSubscriptionUser::subscriptionUsersNodeID(), 'class_identifier' => 'subscription_user', 'creator_id' => ezUser::currentUserID(), 'attributes' => array('status' => 'Pending')); $param['attributes'] = array_merge($param['attributes'], $attributes); $object = eZContentFunctions::createAndPublishObject($param); $object->expireAllViewCache(); return $object; }