本文整理匯總了PHP中IEM::userFlushCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP IEM::userFlushCache方法的具體用法?PHP IEM::userFlushCache怎麽用?PHP IEM::userFlushCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IEM
的用法示例。
在下文中一共展示了IEM::userFlushCache方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ReduceEmails
/**
* ReduceEmails
* Reduces the maximum amount of emails the current user can send.
*
* @param Int $reduce_emails_by The number of emails to reduce by.
*
* @return Boolean True if the reduction was completed successfully, otherwise false.
*/
function ReduceEmails($reduce_emails_by=0) {
if ($this->userid <= 0) {
return false;
}
$userid = intval($this->userid);
$reduce_emails_by = intval($reduce_emails_by);
if ($reduce_emails_by == 0) {
return true;
}
if ($this->hasUnlimitedTotalCredit()) {
return true;
}
$this->GetDb();
$currentUser = IEM::userGetCurrent();
if ($currentUser->userid == $this->userid) {
IEM::userFlushCache();
}
return true;
}