示例#1
0
 public function setPuserId($puserId)
 {
     if (self::getPuserId() == $puserId) {
         // same value - don't set for nothing
         return;
     }
     parent::setPuserId($puserId);
     $partnerId = kCurrentContext::getCurrentPartnerId();
     $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $puserId);
     if (!$kuser) {
         throw new kCoreException("Invalid user Id [{$puserId}]", kCoreException::INVALID_USER_ID);
     }
     parent::setKuserId($kuser->getId());
 }