[pLog-svn] r3335 - in plog/trunk/class/dao: . userdata
mark at devel.lifetype.net
mark at devel.lifetype.net
Fri May 5 04:05:33 GMT 2006
Author: mark
Date: 2006-05-05 04:05:32 +0000 (Fri, 05 May 2006)
New Revision: 3335
Modified:
plog/trunk/class/dao/userdata/ploguserdataprovider.class.php
plog/trunk/class/dao/users.class.php
Log:
Fixed the purgeUsers() that Glen reported in mailing list.
Modified: plog/trunk/class/dao/userdata/ploguserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/ploguserdataprovider.class.php 2006-05-05 03:08:32 UTC (rev 3334)
+++ plog/trunk/class/dao/userdata/ploguserdataprovider.class.php 2006-05-05 04:05:32 UTC (rev 3335)
@@ -19,7 +19,7 @@
*/
function PlogUserDataProvider( $providerConfig )
{
- $this->BaseUserDataProvider( $providerConfig, true );
+ $this->BaseUserDataProvider( $providerConfig );
$this->table = $this->getPrefix()."users";
}
@@ -245,7 +245,7 @@
function deleteUser( $userId )
{
// first, delete all of his/her permissions
- if( $this->delete( $userId )) {
+ if( $this->delete( "id", $userId )) {
include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
$perms = new UserPermissions();
$perms->revokeUserPermissions( $userId );
@@ -284,6 +284,7 @@
$r_result->Close();
// now delete album
+ include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryalbums.class.php" );
$galleryalbums = new GalleryAlbums();
$al_query = "SELECT ga.id AS id, ga.owner_id as owner_id
FROM ".$this->getPrefix()."gallery_albums AS ga, ".$this->getPrefix()."blogs AS b, ".$this->getPrefix()."users AS u
@@ -301,6 +302,7 @@
// check if the deleted user owns any blog, if they does, delete the blog
// the deleteBlog function will take care of deleting articles etc...
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+ include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );
$blogs = new Blogs();
$userfolder = new GalleryResourceStorage();
Modified: plog/trunk/class/dao/users.class.php
===================================================================
--- plog/trunk/class/dao/users.class.php 2006-05-05 03:08:32 UTC (rev 3334)
+++ plog/trunk/class/dao/users.class.php 2006-05-05 04:05:32 UTC (rev 3335)
@@ -156,7 +156,15 @@
function deleteUser( $userId )
{
return( $this->_provider->deleteUser( $userId ));
- }
+ }
+
+ /**
+ * Purge users from the database
+ */
+ function purgeUsers()
+ {
+ return( $this->_provider->purgeUsers());
+ }
/**
* returns the total number of users
More information about the pLog-svn
mailing list