The WorksForWeb Community Forums
Welcome to the WorksForWeb community forums. Here you can discuss WorksForWeb products with others and contribute to the rapidly growing WorksForWeb community. Please note that while WorksForWeb staff try to maintain presence on the forums, this is not the most reliable way to contact WorksForWeb staff. In case you require a timely response from WorksForWeb on an issue, please open a support ticket here. For pre-sales questions, please open a sales ticket here.

Welcome, Guest. Please login or register.
May 21, 2012, 08:49:45 PM

Login with username, password and session length
Search:     Advanced search
Added the iLister-related Boards

Rate My Site Boards Added

Merged iAuto and iRealty Support Forums together

Several new tips in the Tips and Tricks section
1,604 Posts in 625 Topics by 1,179 Members
Latest Member: bobsteam
* Home Help Search Login Register
+  The iAuto/iRealty/iLister Support Forum
|-+  iAuto and iRealty v.2.x - 3.x
| |-+  Tips and Tricks
| | |-+  Orphaned Listings fix
« previous next »
Pages: [1] Print
Author Topic: Orphaned Listings fix  (Read 1420 times)
highnote
Newbie
*

Karma: 1
Posts: 38


View Profile
« on: June 28, 2007, 12:04:48 AM »

If a user is deleted from the admin console, any listings that user had created remain in the database and are then "orphaned" and there is no real way to search for them.

To fix this, I wrote a little function to delete all user's listings during a user_delete.
I have attached a zip file with the file here.  The modified file is  /system/modules/users/admin/functions/edit_users.php

Changes are in lines 94-102 and the new function is at the top called: delete_user_listings()
There is perhaps a more elegant way to search for all the listings for a user, but this way worked based on my unit testing.
Please review and let me know if you see any issues in the code.
Regards,
Lou
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Classified Software by Worksforweb Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!