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