本文整理匯總了PHP中IPSMember::fetchIgnoredUsers方法的典型用法代碼示例。如果您正苦於以下問題:PHP IPSMember::fetchIgnoredUsers方法的具體用法?PHP IPSMember::fetchIgnoredUsers怎麽用?PHP IPSMember::fetchIgnoredUsers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IPSMember
的用法示例。
在下文中一共展示了IPSMember::fetchIgnoredUsers方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setMember
/**
* Set current member to the member ID specified
*
* @param integer Member ID
* @return @e void
*/
public static function setMember($member_id)
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval($member_id);
$addrs = array();
//-----------------------------------------
// If we have a member ID, set up the member
//-----------------------------------------
if ($member_id) {
self::$data_store = IPSMember::load($member_id, 'extendedProfile,customFields,groups');
}
/* Got a member ID? */
if (!empty($member_id) && self::$data_store['member_id']) {
self::setUpMember();
self::instance()->language_id = self::$data_store['language'];
# Form hash
self::instance()->form_hash = md5(self::$data_store['email'] . '&' . self::$data_store['member_login_key'] . '&' . self::$data_store['joined']);
} else {
self::$data_store = IPSMember::setUpGuest();
self::instance()->perm_id = !empty(self::$data_store['org_perm_id']) ? self::$data_store['org_perm_id'] : self::$data_store['g_perm_id'];
self::instance()->perm_id_array = explode(',', self::instance()->perm_id);
if (IPSCookie::get('language')) {
self::instance()->language_id = IPSCookie::get('language');
}
# Form hash
self::instance()->form_hash = md5("this is only here to prevent it breaking on guests");
}
/* Get the ignored users */
if (IPS_AREA == 'public') {
/* Ok, Fetch ignored users */
self::instance()->ignored_users = IPSMember::fetchIgnoredUsers(self::$data_store);
}
//-----------------------------------------
// Set member data
//-----------------------------------------
self::instance()->member_id = $member_id;
}
示例2: _ignoreSig
/**
* Ignore signature
*/
protected function _ignoreSig()
{
$memberId = trim($this->request['memberId']);
$memberId = is_numeric($memberId) ? $memberId : 'all';
/* Whut */
if ($memberId == 'all') {
IPSMember::save($this->memberData['member_id'], array('core' => array('view_sigs' => 0)));
} else {
/* Insert or update? */
$ignored = IPSMember::fetchIgnoredUsers($this->memberData);
if (!empty($ignored[$memberId])) {
/* Update */
$this->DB->update('ignored_users', array('ignore_signatures' => 1), 'ignore_owner_id=' . $this->memberData['member_id'] . ' AND ignore_ignore_id=' . $memberId);
} else {
$this->DB->insert('ignored_users', array('ignore_owner_id' => $this->memberData['member_id'], 'ignore_ignore_id' => $memberId, 'ignore_messages' => 0, 'ignore_topics' => 0, 'ignore_signatures' => 1));
}
/* Rebuild cache */
IPSMember::rebuildIgnoredUsersCache($this->memberData);
}
$this->returnJsonArray(array('status' => 'ok'));
}