本文整理匯總了PHP中IPSMember::checkIgnoredStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::checkIgnoredStatus方法的具體用法?PHP IPSMember::checkIgnoredStatus怎麽用?PHP IPSMember::checkIgnoredStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::checkIgnoredStatus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _okToPost
/**
* Check for mod posts or restricted posts or ignored
*
* @param array [Array of author data, uses getAuthor if none]
* @param array [Array of status owner information uses $this->_internalData['StatusOwner'] if none]
* @return bool
*/
protected function _okToPost($author = null, $owner = null)
{
$author = $author === null ? $this->getAuthor() : $author;
$owner = $owner === null ? $this->_internalData['StatusOwner'] : $owner;
/* Restricted Posting */
if ($author['restrict_post']) {
if ($author['restrict_post'] == 1) {
return FALSE;
}
$post_arr = IPSMember::processBanEntry($author['restrict_post']);
if (time() >= $post_arr['date_end']) {
/* Update this member's profile */
IPSMember::save($author['member_id'], array('core' => array('restrict_post' => 0)));
} else {
return FALSE;
}
}
/* Moderated Posting */
if ($author['mod_posts']) {
if ($author['mod_posts'] == 1) {
return FALSE;
} else {
$mod_arr = IPSMember::processBanEntry($author['mod_posts']);
if (time() >= $mod_arr['date_end']) {
/* Update this member's profile */
IPSMember::save($author['member_id'], array('core' => array('mod_posts' => 0)));
} else {
return FALSE;
}
}
}
/* Member is ignoring you! */
if (IPSMember::checkIgnoredStatus($author['member_id'], $owner['member_id'], 'messages')) {
return false;
}
return TRUE;
}