Page 1 of 1

Assigning Posts/Where is Purchased Post Data Kept?

PostPosted: February 12th, 2011, 8:05 pm
by PxO Ink
Hi,

I'm wondering if I can assign a specific post to a user once they've signed up. Assuming that this kind of request fell under user meta data, this is my function mockup to explain:

Code: Select all
function assignPost($user_id, $post_id) {
     $posts = get_user_meta($user_id, 'posts_purchased', true);
     $posts .= ":$post_id";
     update_user_meta($user_id, 'posts_purchased', $posts);
}


I basically want to assign everyone post_id = 1, and from then on I want only certain users to be able to access certain posts (depending upon other variables, most likely meta data.) I want them all to be under the same role.

Hopefully I can also somehow integrate drip feeds into this, like once a post has been assigned 7 days later it's sent to them via email.

This is really important to me and if anyone can point me in the right direction I would be very grateful.

Re: Assigning Posts/Where is Purchased Post Data Kept?

PostPosted: February 14th, 2011, 10:41 am
by PxO Ink
Just giving this a little bump to get more attention.

Is there an area where posts are matched to users? Maybe that would lead me in the right direction. Or maybe there is actually a hook or function to assign posts to users?