Guest User

Untitled

a guest
Jan 24th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. //
  2.             // Template files
  3.             //
  4.             if( !property_exists($page, $page->user_id)) continue;
  5.             if( $page->user_id == 0) continue;
  6.             //
  7.             // Get and verify there is a user
  8.             //
  9.             $user = $this->usermodel->get_by_id($page->user_id);
  10.             if( !$user || !$user->is_active_subscriber()) continue;
  11.             //
  12.             // Verify a subscriber exists
  13.             //
  14.             $subscriber = $user->get_subscriber();
  15.             if( !$subscriber ) continue;
  16.             //
  17.             // Verify the correct subscription type
  18.             //         
  19.             $subscription = $subscriber->get_subscription();             
  20.              
  21.             if( !$subscription ||
  22.                 $subscription->product->handle == "unlimited" ||
  23.                 $subscription->product->handle == "complimentary-subscription" ||
  24.                 $subscription->state == "canceled"
  25.             ) continue;
Add Comment
Please, Sign In to add comment