I was working on adding taxonomy categorization to the userpoints_invite module and, along the way, discovered that the "Makeup Points issued to inviter to be removed when user is deleted?" function is broken in the module. To be sure, I installed the current dev versions on a clean Drupal 6.8 install and tested it there. Basically, if this function is enabled in the settings page and you delete a user, the user gets deleted, but the points are not removed and Drupal returns a blank page on the action.
Even for users not created by an invite, the delete function has the same result (user deleted & blank page returned)
To further test, I removed the delete function from the module and ran through both manually adding a user and inviting a user. With the function gone, deleting a user succeeds and returns normally (but, of course, has no effect on points since the function was not present).
Eventually, I found this: http://drupal.org/node/114774#db-num-rows
Replacing the db_num_rows call in the delete function with db_result solved it.
So, attached is a patch that fixes the delete error AND adds points categorization!
| Comment | File | Size | Author |
|---|---|---|---|
| userpoints_invite_category.patch | 3.14 KB | fred0 |
Comments
Comment #1
kbahey commentedFixed with some code simplification and style fixes.