示例#1
0
 public function getFacebookUser()
 {
     if ($this->getIdUser() === 0) {
         $profile = Application_Model_User_Profile::getByEmail($this->getUserEmail());
         if (!$profile instanceof Application_Model_User_Profile) {
             $profile = parent::_createProfile();
             $profile->setConfirmedEmail();
             $profile->save();
         } else {
             $this->setProfile($profile);
             $this->save();
         }
     } else {
         $profile = parent::getProfile();
     }
     return $profile;
 }