Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Functions for Groups #262301
    ssimo3@lsuhsc.edu
    Participant

    I found the function NewsletterModule::get_lists(), but I would like to know which function (if any) adds a given TNP_User to a TNP_List.

    Also, I will be managing the relationship between the Newsletter Plugin and Pods with a custom field named pods_id. It would be helpful to know if I can run code such as the following:

    `
    $newsletterUsers = NewsletterUsers::instance();
    $tnpUser = null;
    if ($newsletterUsers->email_exists($email)) {
    $tnpUser = $users->get_user($email);
    $newsletterUsers->set_user_field($user->id, “name”, $name);
    $newsletterUsers->set_user_field($user->id, “pods_id”, $pods_id);
    } else {
    $tnpUser = $users->save_user(array(
    “email” => $email,
    “name” => $name,
    “pods_id” => $pods_id
    );
    }
    `

    Note that in my array, I did NOT nest the custom fields within their own property.

    Thank you!!!

    Stuart

Viewing 1 post (of 1 total)