[pLog-svn] r4582 - plog/branches/lifetype-1.1.5/class/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Fri Jan 26 10:09:17 EST 2007


Author: oscar
Date: 2007-01-26 15:09:16 +0000 (Fri, 26 Jan 2007)
New Revision: 4582

Modified:
   plog/branches/lifetype-1.1.5/class/dao/users.class.php
Log:
this should fix issue 1087 (http://bugs.lifetype.net/view.php?id=1087), purging a disabled user who is not the owner of a blog will not delete the blog anymore


Modified: plog/branches/lifetype-1.1.5/class/dao/users.class.php
===================================================================
--- plog/branches/lifetype-1.1.5/class/dao/users.class.php	2007-01-26 15:05:12 UTC (rev 4581)
+++ plog/branches/lifetype-1.1.5/class/dao/users.class.php	2007-01-26 15:09:16 UTC (rev 4582)
@@ -170,9 +170,10 @@
 	        foreach( $users as $user )
 	        {
 	        	$userBlogs = $this->_provider->getUsersBlogs( $user->getId() );
-	        	foreach( $userBlogs as $userBlog )
-	        	{
-	        		$blogs->deleteBlog( $userBlog->getId() );
+	        	foreach( $userBlogs as $userBlog ) {
+					// delete the blog only if the user is the owner
+					if( $userBlog->getOwnerId() == $user->getId())
+	        			$blogs->deleteBlog( $userBlog->getId());
 	        	}
 	        	
 	        	$this->deleteUser( $user->getId() );



More information about the pLog-svn mailing list