当前位置: 首页>>代码示例>>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;未经允许,请勿转载。