Hello,
We have a wiki that was designed by a 3rd party developer. The problem we have had is that users' who have been made "inactive" still show up in searches. The work around to stop user from being seen is removing properties associated with that user.
To access the user properties, we would make a call to api passing a url encoded username is this format: http://www.ourwiki.com/@api/users/=john_smith%40ourwiki.com/properties
This will then return XML that has the properites itemized.
The next step is what I'm not really sure how to proceed. We need to somehow loop through all of the properties and get the name of the property so that we can delete them making a Delete call through the API. The format for Delete is DELETE:users/{userid}/properties/{key}
Ideally, it would be nice to pass the username as a parameter once we have a working script.
I'm somewhat new to working with APIs in PHP so if anyone has some ideas or can help with this it would be greatly appreciated.
Please see this link to download the properties xml file: http://queencitytech.com/properties.zip
Here is what is returned after retreving the user properties:
12010-04-29T04:39:29ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngJohnh2010-04-29T04:39:29ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngJohn2010-04-29T04:39:29ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngSmith2010-04-29T04:39:30ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngSmith, John2010-04-29T04:39:30ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngJohn2010-04-29T04:39:31ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.png757E2010-04-29T04:39:31ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngExt: 61322010-04-29T04:39:31ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngJohn_Smith@ourwiki.com2010-04-29T04:39:32ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngmiddleware/images/headshots/01_799/01_799_hs.jpg2010-04-29T04:39:32ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngmiddleware/images/lifestyle/01_799/01_799_ls.jpg2010-04-29T04:39:32ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngImplementation2010-04-29T04:39:33ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngWeil, T2010-04-29T04:39:33ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngCo-op2010-04-29T04:39:34ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.png0000-00-00 00:00:002010-04-29T04:39:34ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngCoop2010-05-02T04:40:35ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.pngfalse2010-05-03T19:09:[email protected][email protected][email protected]://www.avatar.com/avatar/52909eac4d19209592168dc96f3d4fca.pngCincinnati2010-05-14T04:15:13ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.png4572010-07-16T04:50:13ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.png2010-07-14 16:06:232010-07-16T04:50:17ZAdminAdmin0ee8d636cdd5e57469516332b9325cbchttp://www.avatar.com/avatar/0ee8d636cdd5e57469516332b9325cbc.png
Here is the file that includes var_dump(array($delete, $property)) http://queencitytech.com/deletescript.php.html