本文整理汇总了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;
}