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


PHP Relation::delete_user_relations方法代碼示例

本文整理匯總了PHP中Relation::delete_user_relations方法的典型用法代碼示例。如果您正苦於以下問題:PHP Relation::delete_user_relations方法的具體用法?PHP Relation::delete_user_relations怎麽用?PHP Relation::delete_user_relations使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Relation的用法示例。


在下文中一共展示了Relation::delete_user_relations方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete_user

 /**
  * Soft delete of user related data.
  * function to delete a user from the system.
  * this function uses the method of th respective api's to delete the user related data.
  */
 public static function delete_user($user_id)
 {
     Logger::log("Enter: function User::delete_user");
     // Delete user content on homepage: Call content delete.
     $uid = (int) $user_id;
     try {
         Content::delete_user_content($uid);
         // Deleting user groups.
         $Group = new Group();
         $Group->delete_user_groups($uid);
         // Deleting user albums.
         Album::delete_user_albums($uid);
         // Deleting user relations.
         Relation::delete_user_relations($uid);
         // Deleting user comments.
         Comment::delete_user_comments($uid);
         PaForumsUsers::delete_PaForumsUsers($uid);
         UserPopularity::deleteUserPopularity($uid);
     } catch (PAException $e) {
         Logger::log('Exception occured while deleting user:' . $uid . ' : ' . $e->message);
         throw new PAException(INVALID_ARGUMENTS, "User deletion failed for user_id =  '{$uid}' due to '{$e->message}'");
     }
     Logger::log("Exit: function User::delete_user");
 }
開發者ID:CivicCommons,項目名稱:people-aggregator,代碼行數:29,代碼來源:User.php

示例2: delete_user

 /**
  * Soft delete of user related data.
  * function to delete a user from the system. 
  * this function uses the method of th respective api's to delete the user related data.
  */
 public static function delete_user($user_id)
 {
     Logger::log("Enter: function User::delete_user");
     // Delete user content on homepage: Call content delete.
     try {
         Content::delete_user_content($user_id);
         // Deleting user groups.
         $Group = new Group();
         $Group->delete_user_groups($user_id);
         // Deleting user albums.
         Album::delete_user_albums($user_id);
         // Deleting user relations.
         Relation::delete_user_relations($user_id);
         // Deleting user comments.
         Comment::delete_user_comments($user_id);
     } catch (PAException $e) {
         Logger::log('Exception occured while deleting user:' . $user_id . ' : ' . $e->message);
         throw new PAException(USER_DELETION_FAILED, "User deletion failed for user_id =  '{$user_id}' due to '{$e->message}'");
     }
     Logger::log("Exit: function User::delete_user");
 }
開發者ID:CivicCommons,項目名稱:oldBellCaPA,代碼行數:26,代碼來源:User.php


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