本文整理匯總了PHP中BuckysUser::getUserNotificationSettings方法的典型用法代碼示例。如果您正苦於以下問題:PHP BuckysUser::getUserNotificationSettings方法的具體用法?PHP BuckysUser::getUserNotificationSettings怎麽用?PHP BuckysUser::getUserNotificationSettings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BuckysUser
的用法示例。
在下文中一共展示了BuckysUser::getUserNotificationSettings方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addNotificationsForPendingPost
/**
* Add notification for the users whose 'My post approved' set 1.
*
* @param Int $ownerID
* @param Int $topicID
* @param Int $replyID
* @return bool
*/
public function addNotificationsForPendingPost($ownerID, $topicID, $replyID = null)
{
global $db, $TNB_GLOBALS;
$forumSettings = BuckysUser::getUserNotificationSettings($ownerID);
$activity = new BuckysActivity();
if ($forumSettings['notifyMyPostApproved']) {
if ($replyID == null) {
$activity->addForumActivity($ownerID, $topicID, 'forum', BuckysForumNotification::ACTION_TYPE_TOPIC_APPROVED, 0);
} else {
$activity->addForumActivity($ownerID, $topicID, 'forum', BuckysForumNotification::ACTION_TYPE_REPLY_APPROVED, $replyID);
}
}
return true;
}
示例2: dirname
<?php
require dirname(__FILE__) . '/includes/bootstrap.php';
if (!($userID = buckys_is_logged_in())) {
buckys_redirect('/index.php', MSG_NOT_LOGGED_IN_USER, MSG_TYPE_ERROR);
}
$view = [];
//Save Shipping info
$tradeUserIns = new BuckysTradeUser();
if (isset($_POST['action']) && $_POST['action'] == 'saveNotifyInfo') {
$result = BuckysUser::saveUserNotificationSettings($userID, $_POST);
if ($result === true) {
buckys_redirect('/notify.php', MSG_NOTIFICATION_SETTINGS_SAVED);
} else {
buckys_redirect('/notify.php', $result, MSG_TYPE_ERROR);
}
}
//Get offer_received info
$view['trade_user_info'] = $tradeUserIns->getUserByID($userID);
$userNotifyInfo = BuckysUser::getUserNotificationSettings($userID);
if (empty($view['trade_user_info'])) {
buckys_redirect('/index.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('info.css');
$TNB_GLOBALS['content'] = 'notify';
$TNB_GLOBALS['title'] = 'Notification Settings - ' . TNB_SITE_NAME;
require DIR_FS_TEMPLATE . $TNB_GLOBALS['template'] . "/" . $TNB_GLOBALS['layout'] . ".php";