本文整理汇总了PHP中cmsActions::removeUserLog方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsActions::removeUserLog方法的具体用法?PHP cmsActions::removeUserLog怎么用?PHP cmsActions::removeUserLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmsActions
的用法示例。
在下文中一共展示了cmsActions::removeUserLog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteUser
public function deleteUser($user_id, $is_delete = false){
cmsCore::callEvent('DELETE_USER', $user_id);
if ($user_id == 1) { return false; }
if ($is_delete) {
$avatar = $this->inDB->get_field('cms_user_profiles', "user_id = '$user_id'", 'imageurl');
if ($avatar && $avatar != 'nopic.jpg'){
@unlink(PATH.'/images/users/avatars/'.$avatar);
@unlink(PATH.'/images/users/avatars/small/'.$avatar);
}
$this->inDB->query("DELETE FROM cms_users WHERE id = '$user_id' LIMIT 1");
$this->inDB->query("DELETE FROM cms_user_profiles WHERE user_id = '$user_id' LIMIT 1");
$this->inDB->query("DELETE FROM cms_user_wall WHERE user_id = '$user_id' AND usertype = 'user'");
$this->inDB->query("DELETE FROM cms_user_friends WHERE to_id = '$user_id' OR from_id = '$user_id'");
$this->inDB->query("DELETE FROM cms_user_clubs WHERE user_id = '$user_id'");
cmsCore::loadClass('blog');
$inBlog = cmsBlogs::getInstance();
$inBlog->owner = 'user';
$user_blog = $inBlog->getBlogByUserId($user_id);
if ($user_blog){
$inBlog->deleteBlog($user_blog['id']);
}
} else {
$this->inDB->query("UPDATE cms_users SET is_deleted = 1 WHERE id = '$user_id'");
}
$this->inDB->query("DELETE FROM cms_user_awards WHERE user_id = '$user_id'");
$this->inDB->query("DELETE FROM cms_subscribe WHERE user_id = '$user_id'");
cmsActions::removeUserLog($user_id);
}