當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EfrontUser::cached_modules方法代碼示例

本文整理匯總了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;
 }
開發者ID:kaseya-university,項目名稱:efront,代碼行數:39,代碼來源:user.class-backup.php


注:本文中的EfrontUser::cached_modules方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。