当前位置: 首页>>代码示例>>PHP>>正文


PHP calendar::deleteUserCalendarEvents方法代码示例

本文整理汇总了PHP中calendar::deleteUserCalendarEvents方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::deleteUserCalendarEvents方法的具体用法?PHP calendar::deleteUserCalendarEvents怎么用?PHP calendar::deleteUserCalendarEvents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在calendar的用法示例。


在下文中一共展示了calendar::deleteUserCalendarEvents方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 /**
  * Delete user
  *
  * This function is used to delete a user from the system.
  * The user cannot be deleted if he is the last system administrator.
  * <br/>Example:
  * <code>
  * $user = EfrontUserFactory :: factory('jdoe');
  * $user -> delete();
  * </code>
  *
  * @return boolean True if the user was deleted successfully
  * @since 3.5.0
  * @access public
  */
 public function delete()
 {
     // Added by Masoud Sadjadi on July 6, 2014 to support vLab in eFront
     $vLab_username = $this->user['login'];
     $this->logout();
     ///MODULES2 - Module user delete events - Before anything else
     // Get all modules (NOT only the ones that have to do with the user type)
     $modules = eF_loadAllModules();
     // Trigger all necessary events. If the function has not been re-defined in the derived module class, nothing will happen
     foreach ($modules as $module) {
         $module->onDeleteUser($this->user['login']);
     }
     try {
         $directory = new EfrontDirectory($this->user['directory']);
         $directory->delete();
     } catch (EfrontFileException $e) {
         $message = _USERDIRECTORYCOULDNOTBEDELETED . ': ' . $e->getMessage() . ' (' . $e->getCode() . ')';
         //This does nothing at the moment
     }
     foreach ($this->aspects as $aspect) {
         $aspect->delete();
     }
     calendar::deleteUserCalendarEvents($this->user['login']);
     eF_updateTableData("f_forums", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("f_messages", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("f_topics", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("f_poll", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("news", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("files", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("f_folders", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("f_personal_messages", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("bookmarks", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("comments", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("f_users_to_polls", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("logs", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("rules", "users_LOGIN='" . $this->user['login'] . "'");
     //eF_deleteTableData("users_online", "users_LOGIN='".$this -> user['login']."'");
     eF_deleteTableData("user_times", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_surveys", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_done_surveys", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("survey_questions_done", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("lessons_timeline_topics_data", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("events", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("profile_comments", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_content", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_lessons", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_courses", "users_LOGIN='" . $this->user['login'] . "'");
     if (G_VERSIONTYPE != 'community') {
         #cpp#ifndef COMMUNITY
         eF_deleteTableData("payments", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("facebook_connect", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("users_to_skillgap_tests", "users_LOGIN='" . $this->user['login'] . "'");
     }
     #cpp#endif
     //This line was in EfrontProfessor and EfrontStudent without an obvious reason. Admins may also be members of groups
     eF_deleteTableData("users_to_groups", "users_LOGIN='" . $this->user['login'] . "'");
     //Changing order of these lines because of #4318, where system removal notification was set (user triggering the event)
     eF_deleteTableData("notifications", "recipient='" . $this->user['login'] . "'");
     EfrontEvent::triggerEvent(array("type" => EfrontEvent::SYSTEM_REMOVAL, "users_LOGIN" => $this->user['login'], "users_name" => $this->user['name'], "users_surname" => $this->user['surname']));
     eF_deleteTableData("users", "login='" . $this->user['login'] . "'");
     // Added by Masoud Sadjadi on July 6, 2014 to support vLab in eFront
     // Beging addition
     // $vLab_username 				= $this -> user['login'];
     $vLab_username_urlEncoded = rawurlencode($vLab_username);
     $vLab_courseid = 123;
     // Kaseya 7.0 Fundamentals Workshop
     $vLab_courseid_urlEncoded = rawurlencode($vLab_courseid);
     // $vLab_moodleURL = "http://localhost/moodle19";
     $vLab_moodleURL = "http://ita-portal.cis.fiu.edu";
     // auto delete
     $str = $vLab_moodleURL . "/mod/deva/embedded/auto-delete.php?username={$vLab_username_urlEncoded}&courseid={$vLab_courseid_urlEncoded}";
     // echo $str . '<br>';
     $payload = file_get_contents($str);
     // echo $payload;
     return true;
 }
开发者ID:kaseya-university,项目名称:efront,代码行数:91,代码来源:user.class-backup.php

示例2: delete

 /**
  * Delete user
  *
  * This function is used to delete a user from the system.
  * The user cannot be deleted if he is the last system administrator.
  * <br/>Example:
  * <code>
  * $user = EfrontUserFactory :: factory('jdoe');
  * $user -> delete();
  * </code>
  *
  * @return boolean True if the user was deleted successfully
  * @since 3.5.0
  * @access public
  */
 public function delete()
 {
     $this->logout();
     ///MODULES2 - Module user delete events - Before anything else
     // Get all modules (NOT only the ones that have to do with the user type)
     $modules = eF_loadAllModules();
     // Trigger all necessary events. If the function has not been re-defined in the derived module class, nothing will happen
     foreach ($modules as $module) {
         $module->onDeleteUser($this->user['login']);
     }
     try {
         $directory = new EfrontDirectory($this->user['directory']);
         $directory->delete();
     } catch (EfrontFileException $e) {
         $message = _USERDIRECTORYCOULDNOTBEDELETED . ': ' . $e->getMessage() . ' (' . $e->getCode() . ')';
         //This does nothing at the moment
     }
     foreach ($this->aspects as $aspect) {
         $aspect->delete();
     }
     calendar::deleteUserCalendarEvents($this->user['login']);
     eF_updateTableData("f_forums", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("f_messages", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("f_topics", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("f_poll", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("news", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_updateTableData("files", array("users_LOGIN" => ''), "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("f_folders", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("f_personal_messages", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("bookmarks", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("comments", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("f_users_to_polls", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("logs", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("rules", "users_LOGIN='" . $this->user['login'] . "'");
     //eF_deleteTableData("users_online", "users_LOGIN='".$this -> user['login']."'");
     eF_deleteTableData("user_times", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_surveys", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_done_surveys", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("survey_questions_done", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("lessons_timeline_topics_data", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("events", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("profile_comments", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_content", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_lessons", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("users_to_courses", "users_LOGIN='" . $this->user['login'] . "'");
     eF_deleteTableData("scorm_data", "users_LOGIN='" . $this->user['login'] . "'");
     if (G_VERSIONTYPE != 'community') {
         #cpp#ifndef COMMUNITY
         eF_deleteTableData("payments", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("facebook_connect", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("users_to_skillgap_tests", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_data_2004", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_activity_progress_information", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_activity_state_information", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_comments_from_learner", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_global_state_information", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_interactions", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_learner_preferences", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_maps_info", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_objective_progress_information", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_shared_data", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_shared_data_not_g", "users_LOGIN='" . $this->user['login'] . "'");
         eF_deleteTableData("scorm_sequencing_objective_progress_information_all", "users_LOGIN='" . $this->user['login'] . "'");
     }
     #cpp#endif
     //This line was in EfrontProfessor and EfrontStudent without an obvious reason. Admins may also be members of groups
     eF_deleteTableData("users_to_groups", "users_LOGIN='" . $this->user['login'] . "'");
     //Changing order of these lines because of #4318, where system removal notification was set (user triggering the event)
     eF_deleteTableData("notifications", "recipient='" . $this->user['login'] . "'");
     EfrontEvent::triggerEvent(array("type" => EfrontEvent::SYSTEM_REMOVAL, "users_LOGIN" => $this->user['login'], "users_name" => $this->user['name'], "users_surname" => $this->user['surname']));
     eF_deleteTableData("users", "login='" . $this->user['login'] . "'");
     return true;
 }
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:88,代码来源:user.class.php


注:本文中的calendar::deleteUserCalendarEvents方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。