本文整理汇总了PHP中CRM_Utils_String::maskEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_String::maskEmail方法的具体用法?PHP CRM_Utils_String::maskEmail怎么用?PHP CRM_Utils_String::maskEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_String
的用法示例。
在下文中一共展示了CRM_Utils_String::maskEmail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
public function preProcess()
{
$this->_type = 'unsubscribe';
$this->_job_id = $job_id = CRM_Utils_Request::retrieve('jid', 'Integer', $this);
$this->_queue_id = $queue_id = CRM_Utils_Request::retrieve('qid', 'Integer', $this);
$this->_hash = $hash = CRM_Utils_Request::retrieve('h', 'String', $this);
if (!$job_id || !$queue_id || !$hash) {
CRM_Core_Error::fatal(ts("Missing Parameters"));
}
// verify that the three numbers above match
$q = CRM_Mailing_Event_BAO_Queue::verify($job_id, $queue_id, $hash);
if (!$q) {
CRM_Core_Error::fatal(ts("There was an error in your request"));
}
list($displayName, $email) = CRM_Mailing_Event_BAO_Queue::getContactInfo($queue_id);
$this->assign('display_name', $displayName);
$emailMasked = CRM_Utils_String::maskEmail($email);
$this->assign('email_masked', $emailMasked);
$this->assign('email', $email);
$this->_email = $email;
$groups = CRM_Mailing_Event_BAO_Unsubscribe::unsub_from_mailing($job_id, $queue_id, $hash, TRUE);
$this->assign('groups', $groups);
$groupExist = NULL;
foreach ($groups as $key => $value) {
if ($value) {
$groupExist = TRUE;
}
}
if (!$groupExist) {
$statusMsg = ts('Email: %1 has been successfully unsubscribed from this Mailing List/Group.', array(1 => $email));
CRM_Core_Session::setStatus($statusMsg, '', 'fail');
}
$this->assign('groupExist', $groupExist);
}
示例2: preProcess
public function preProcess()
{
$this->_type = 'optout';
$this->_job_id = $job_id = CRM_Utils_Request::retrieve('jid', 'Integer', $this);
$this->_queue_id = $queue_id = CRM_Utils_Request::retrieve('qid', 'Integer', $this);
$this->_hash = $hash = CRM_Utils_Request::retrieve('h', 'String', $this);
if (!$job_id || !$queue_id || !$hash) {
CRM_Core_Error::fatal(ts("Missing input parameters"));
}
// verify that the three numbers above match
$q = CRM_Mailing_Event_BAO_Queue::verify($job_id, $queue_id, $hash);
if (!$q) {
CRM_Core_Error::fatal(ts("There was an error in your request"));
}
list($displayName, $email) = CRM_Mailing_Event_BAO_Queue::getContactInfo($queue_id);
$this->assign('display_name', $displayName);
$emailMasked = CRM_Utils_String::maskEmail($email);
$this->assign('email_masked', $emailMasked);
$this->assign('email', $email);
$this->_email = $email;
}