本文整理匯總了PHP中myPartnerUtils::emailChangedEmail方法的典型用法代碼示例。如果您正苦於以下問題:PHP myPartnerUtils::emailChangedEmail方法的具體用法?PHP myPartnerUtils::emailChangedEmail怎麽用?PHP myPartnerUtils::emailChangedEmail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類myPartnerUtils
的用法示例。
在下文中一共展示了myPartnerUtils::emailChangedEmail方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$allow_empty = $this->getP("allow_empty_field", false);
if ($allow_empty == "false" || $allow_empty === 0) {
$allow_empty = false;
}
$partner = new Partner();
$obj_wrapper = objectWrapperBase::getWrapperClass($partner, 0);
$updateable_fields = $obj_wrapper->getUpdateableFields();
// TODO - use fillObjectFromMapOrderedByFields instead
$fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $partner, "partner_", $updateable_fields, BasePeer::TYPE_PHPNAME, $allow_empty);
// check that mandatory fields were set
// TODO
if (count($fields_modified) > 0) {
$target_partner = PartnerPeer::retrieveByPK($partner_id);
if ($partner && $target_partner) {
if (@$fields_modified["adminEmail"] && $target_partner->getAdminEmail() != $fields_modified["adminEmail"]) {
myPartnerUtils::emailChangedEmail($partner_id, $target_partner->getAdminEmail(), $fields_modified["adminEmail"], $target_partner->getName(), PartnerPeer::KALTURAS_PARTNER_EMAIL_CHANGE);
}
$partner->setType($target_partner->getType());
baseObjectUtils::fillObjectFromObject($updateable_fields, $partner, $target_partner, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, $allow_empty);
$target_partner->save();
$this->addMsg("partner", objectWrapperBase::getWrapperClass($target_partner, objectWrapperBase::DETAIL_LEVEL_DETAILED));
$this->addDebug("added_fields", $fields_modified);
} else {
$this->addError(APIErrors::UNKNOWN_PARTNER_ID);
}
} else {
$this->addError(APIErrors::NO_FIELDS_SET_FOR_PARTNER);
}
}
示例2: postUpdate
public function postUpdate(PropelPDO $con = null)
{
if ($this->alreadyInSave) {
return parent::postUpdate($con);
}
$objectUpdated = $this->isModified();
$objectDeleted = false;
if ($this->isColumnModified(kuserPeer::STATUS) && $this->getStatus() == KuserStatus::DELETED) {
$objectDeleted = true;
}
$oldLoginDataId = null;
if ($this->isColumnModified(kuserPeer::LOGIN_DATA_ID)) {
$oldLoginDataId = $this->oldColumnsValues[kuserPeer::LOGIN_DATA_ID];
}
if ($this->isColumnModified(kuserPeer::EMAIL) && $this->getIsAccountOwner() && !is_null($this->oldColumnsValues[kuserPeer::EMAIL])) {
myPartnerUtils::emailChangedEmail($this->getPartnerId(), $this->oldColumnsValues[kuserPeer::EMAIL], $this->getEmail(), $this->getPartner()->getName(), PartnerPeer::KALTURAS_PARTNER_EMAIL_CHANGE);
}
if ($this->getIsAccountOwner() && ($this->isColumnModified(kuserPeer::EMAIL) || $this->isColumnModified(kuserPeer::FIRST_NAME) || $this->isColumnModified(kuserPeer::LAST_NAME))) {
$partner = $this->getPartner();
$partner->setAccountOwnerKuserId($this->getId(), false);
$partner->save();
}
$ret = parent::postUpdate($con);
if ($objectDeleted) {
kEventsManager::raiseEvent(new kObjectDeletedEvent($this));
// if user is deleted - check if shoult also delete login data
UserLoginDataPeer::notifyOneLessUser($this->getLoginDataId());
}
if ($objectUpdated) {
kEventsManager::raiseEvent(new kObjectUpdatedEvent($this));
if (!$objectDeleted && !is_null($oldLoginDataId) && is_null($this->getLoginDataId())) {
// if login was disabled - check if should also delete login data
UserLoginDataPeer::notifyOneLessUser($oldLoginDataId);
}
}
return $ret;
}
示例3: postUpdate
public function postUpdate(PropelPDO $con = null)
{
if ($this->alreadyInSave) {
return parent::postUpdate($con);
}
$objectUpdated = $this->isModified();
$objectDeleted = false;
if ($this->isColumnModified(kuserPeer::STATUS) && $this->getStatus() == KuserStatus::DELETED) {
$objectDeleted = true;
}
$oldLoginDataId = null;
if ($this->isColumnModified(kuserPeer::LOGIN_DATA_ID)) {
$oldLoginDataId = $this->oldColumnsValues[kuserPeer::LOGIN_DATA_ID];
}
if ($this->isColumnModified(kuserPeer::EMAIL) && $this->getIsAccountOwner() && isset($this->oldColumnsValues[kuserPeer::EMAIL]) && !is_null($this->oldColumnsValues[kuserPeer::EMAIL])) {
myPartnerUtils::emailChangedEmail($this->getPartnerId(), $this->oldColumnsValues[kuserPeer::EMAIL], $this->getEmail(), $this->getPartner()->getName(), PartnerPeer::KALTURAS_PARTNER_EMAIL_CHANGE);
}
if ($this->getIsAccountOwner() && ($this->isColumnModified(kuserPeer::EMAIL) || $this->isColumnModified(kuserPeer::FIRST_NAME) || $this->isColumnModified(kuserPeer::LAST_NAME))) {
$partner = $this->getPartner();
$partner->setAccountOwnerKuserId($this->getId(), false);
$partner->save();
}
if ($this->isColumnModified(kuserPeer::SCREEN_NAME) && categoryKuserPeer::isCategroyKuserExistsForKuser($this->getId())) {
$featureStatusToRemoveIndex = new kFeatureStatus();
$featureStatusToRemoveIndex->setType(IndexObjectType::CATEGORY_USER);
$featureStatusesToRemove = array();
$featureStatusesToRemove[] = $featureStatusToRemoveIndex;
$filter = new categoryKuserFilter();
$filter->setUserIdEqual($this->getPuserId());
kJobsManager::addIndexJob($this->getPartnerId(), IndexObjectType::CATEGORY_USER, $filter, true, $featureStatusesToRemove);
}
$ret = parent::postUpdate($con);
if ($objectDeleted) {
kEventsManager::raiseEvent(new kObjectDeletedEvent($this));
// if user is deleted - check if shoult also delete login data
UserLoginDataPeer::notifyOneLessUser($this->getLoginDataId());
}
if ($objectUpdated) {
kEventsManager::raiseEvent(new kObjectUpdatedEvent($this));
if (!$objectDeleted && !is_null($oldLoginDataId) && is_null($this->getLoginDataId())) {
// if login was disabled - check if should also delete login data
UserLoginDataPeer::notifyOneLessUser($oldLoginDataId);
}
}
return $ret;
}