本文整理汇总了PHP中Notifier::sendNotifications方法的典型用法代码示例。如果您正苦于以下问题:PHP Notifier::sendNotifications方法的具体用法?PHP Notifier::sendNotifications怎么用?PHP Notifier::sendNotifications使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notifier
的用法示例。
在下文中一共展示了Notifier::sendNotifications方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: triggerSendNotifications
/**
* Send notification mails to all users @ingroup pages
*
* This page is normally requested by Cron jobs. Read more at http://www.streber-pm.org/2211
*/
function triggerSendNotifications()
{
require_once confGet('DIR_STREBER') . 'std/mail.inc.php';
log_message('triggerSendNotifications()');
list($num_notifications_sent, $num_warnings) = Notifier::sendNotifications();
echo sprintf("Notifications sent: %s\nWarnings: %s\n", $num_notifications_sent, $num_warnings);
if ($num_warnings) {
echo "# Please check errors.log.php for details\n";
}
}
示例2: logout
/**
* Logout the current user and remove cookies @ingroup pages
*/
function logout()
{
global $PH;
global $auth;
### kill cookie ###
$auth->removeUserCookie();
$PH->cur_page_md5 = NULL;
/**
* keep date of last logout
* NOTE: the cur_user-object might be no longer up to date (think about person submit).
* so we get the latest version from the database to update the last_login-field
*/
if ($cur_user = Person::getById($auth->cur_user->id)) {
$cur_user->cookie_string = $auth->cur_user->calcCookieString();
$cur_user->last_logout = getGMTString();
$cur_user->update();
}
### go to login-page ####
$PH->messages[] = "Logged out";
$PH->show('loginForm');
#header("location:index.php");
if ($auth->cur_user) {
$nickname = $auth->cur_user->nickname;
} else {
$nickname = '_nobody_';
}
log_message("'" . $nickname . "' logged out from:" . getServerVar("REMOTE_ADDR", true), LOG_MESSAGE_LOGOUT);
require_once confGet('DIR_STREBER') . 'std/mail.inc.php';
Notifier::sendNotifications();
}