本文整理匯總了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");
}