當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。