Advertisement
tribulant

Fetch a Subscriber

Aug 29th, 2011
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.  
  3. //check if the wpMail class has been defined
  4. if (class_exists('wpMail')) {
  5.     //initialize the wpMail class into an object
  6.     if ($wpMail = new wpMail()) {
  7.         global $Db, $Subscriber;
  8.         $Db -> model = $Subscriber -> model;
  9.        
  10.         //fetch the subscriber
  11.         //you can use 'id', 'email', 'ip_address' or 'user_id' for conditions
  12.         if ($subscriber = $Db -> find(array('id' => 123))) {
  13.             //now you can use the subscriber data according to your needs.
  14.             print_r($subscriber);
  15.         }
  16.     }
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement