本文整理汇总了PHP中Piwik\Piwik::getCurrentUserEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::getCurrentUserEmail方法的具体用法?PHP Piwik::getCurrentUserEmail怎么用?PHP Piwik::getCurrentUserEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Piwik
的用法示例。
在下文中一共展示了Piwik::getCurrentUserEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendMail
private function sendMail($subject, $body)
{
$feedbackEmailAddress = Config::getInstance()->General['feedback_email_address'];
$subject = '[ Feedback Feature - Piwik ] ' . $subject;
$body = Common::unsanitizeInputValue($body) . "\n" . 'Piwik ' . Version::VERSION . "\n" . 'IP: ' . IP::getIpFromHeader() . "\n" . 'URL: ' . Url::getReferrer() . "\n";
$mail = new Mail();
$mail->setFrom(Piwik::getCurrentUserEmail());
$mail->addTo($feedbackEmailAddress, 'Piwik Team');
$mail->setSubject($subject);
$mail->setBodyText($body);
@$mail->send();
}
示例2: template_reportParametersScheduledReports
public static function template_reportParametersScheduledReports(&$out)
{
$view = new View('@ScheduledReports/reportParametersScheduledReports');
$view->currentUserEmail = Piwik::getCurrentUserEmail();
$view->reportType = self::EMAIL_TYPE;
$view->defaultDisplayFormat = self::DEFAULT_DISPLAY_FORMAT;
$view->defaultEmailMe = self::EMAIL_ME_PARAMETER_DEFAULT_VALUE ? 'true' : 'false';
$view->defaultEvolutionGraph = self::EVOLUTION_GRAPH_PARAMETER_DEFAULT_VALUE ? 'true' : 'false';
$out .= $view->render();
}
示例3: sendBug
public function sendBug()
{
Piwik::checkUserHasSomeAdminAccess();
$idSite = Common::getRequestVar('idSite', null, 'int');
$email = Common::getRequestVar('email', null);
$name = Common::getRequestVar('name', null);
$website = Common::getRequestVar('website', null);
$message = Common::getRequestVar('message', null);
$jsonConfig = json_decode(file_get_contents(getcwd() . '/plugins/Chat/plugin.json'), true);
if ($idSite != null && $email != null && $name != null && $website != null && $message != null) {
$mail = new Mail();
$mail->setFrom($email != null ? $email : Piwik::getCurrentUserEmail(), $name != null ? $name : Piwik::getCurrentUserLogin());
$mail->setSubject("Bug report");
$mail->setBodyHtml("Piwik Version : " . Version::VERSION . "<br />\n Chat Version : " . $jsonConfig['version'] . "<br />\n Website : " . $website . "<br /><br /><br />\n Message:<br />" . $message);
$mail->addTo($jsonConfig['authors'][0]['email']);
try {
$mail->send();
} catch (Exception $e) {
throw new Exception("An error occured while sending 'Bug Report' to " . implode(', ', $mail->getRecipients()) . " Error was '" . $e->getMessage() . "'");
}
return true;
}
}