本文整理汇总了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");
}
示例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");
}