/**
  * Return the Charitable_User object for this donor.
  *
  * @return  Charitable_User
  * @access  public
  * @since   1.0.0
  */
 public function get_user()
 {
     if (!isset($this->user)) {
         $this->user = $this->user = Charitable_User::init_with_donor($this->donor_id);
     }
     return $this->user;
 }
Esempio n. 2
0
 /** 
  * @depends test_is_donor
  */
 public function test_is_donor_with_non_wpuser()
 {
     $donor_id = charitable_get_table('donors')->insert(array('email' => '*****@*****.**', 'first_name' => 'Fish', 'last_name' => 'Mooney'));
     $user = Charitable_User::init_with_donor($donor_id);
     $this->assertTrue($user->is_donor());
 }
 /**
  * Returns the donor who made this donation.
  *
  * @return  Charitable_User
  * @access  public
  * @since   1.0.0
  */
 public function get_donor()
 {
     if (!isset($this->donor)) {
         $this->donor = Charitable_User::init_with_donor($this->get_donor_id());
     }
     return $this->donor;
 }