function deleteActiveAccountExpriedUsers(){ $users = new Users(); $blogs = new Blogs(); $expriedUsers = $users->getActiveAccountExpriedUsers(); foreach($expriedUsers as $expriedUser){ $expriedBlogs = $users->getUsersBlogs($expriedUser->getId()); foreach($expriedBlogs as $expriedBlog){ $blogs->deleteBlog($expriedBlog->getId()); } $users->deleteUser($expriedUser->getId()); } }