本文整理匯總了PHP中EfrontUser::cached_modules方法的典型用法代碼示例。如果您正苦於以下問題:PHP EfrontUser::cached_modules方法的具體用法?PHP EfrontUser::cached_modules怎麽用?PHP EfrontUser::cached_modules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類EfrontUser
的用法示例。
在下文中一共展示了EfrontUser::cached_modules方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: persist
/**
* Persist user values
*
* This function is used to store user's changed values to the database.
* <br/>Example:
* <code>
* $user -> surname = 'doe'; //Change object's surname
* $user -> persist(); //Persist changed value
* </code>
*
* @return boolean True if everything is ok
* @since 3.5.0
* @access public
*/
public function persist()
{
$fields = array('password' => $this->user['password'], 'email' => $this->user['email'], 'languages_NAME' => $this->user['languages_NAME'], 'name' => $this->user['name'], 'surname' => $this->user['surname'], 'active' => $this->user['active'], 'comments' => $this->user['comments'], 'user_type' => $this->user['user_type'], 'timestamp' => $this->user['timestamp'], 'avatar' => $this->user['avatar'], 'pending' => $this->user['pending'], 'user_types_ID' => $this->user['user_types_ID'], 'status' => $this->user['status'], 'balance' => $this->user['balance'], 'archive' => $this->user['archive'], 'timezone' => $this->user['timezone'], 'need_pwd_change' => $this->user['need_pwd_change'] ? 1 : 0, 'additional_accounts' => $this->user['additional_accounts'], 'short_description' => $this->user['short_description'], 'autologin' => $this->user['autologin']);
if ($GLOBALS['configuration']['reset_license_note_always']) {
$fields['viewed_license'] = 0;
} else {
$fields['viewed_license'] = $this->user['viewed_license'];
}
$userProfile = eF_getTableData("user_profile", "*", "active=1 AND type <> 'branchinfo' AND type <> 'groupinfo'");
foreach ($userProfile as $value) {
$fields[$value['name']] = $this->user[$value['name']];
}
eF_updateTableData("users", $fields, "login='" . $this->user['login'] . "'");
EfrontCache::getInstance()->deleteCache('usernames');
///MODULES1 - Module user add events
// Get all modules (NOT only the ones that have to do with the user type)
if (!self::$cached_modules) {
self::$cached_modules = eF_loadAllModules();
}
// Trigger all necessary events. If the function has not been re-defined in the derived module class, nothing will happen
foreach (self::$cached_modules as $module) {
$module->onUpdateUser($this->user['login']);
}
return true;
}