id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
8936,Cannot delete user using AccountModule from web_ui,voithos,hasienda,Running trac 0.12.2_ with AccountManagerPlugin 0.3dev-r10371. When trying to delete a user (after logging in) using the web_ui interface_ it gives the error:\r\n\r\n{{{\r\nTraceback (most recent call last):\r\n  File "c:\\docume~1\\voithos\\locals~1\\temp\\easy_install-b06q5m\\Trac-0.12.2-py2.6-win32.egg.tmp\\trac\\web\\main.py"_ line 511_ in _dispatch_request\r\n    dispatcher.dispatch(req)\r\n  File "c:\\docume~1\\voithos\\locals~1\\temp\\easy_install-b06q5m\\Trac-0.12.2-py2.6-win32.egg.tmp\\trac\\web\\main.py"_ line 237_ in dispatch\r\n    resp = chosen_handler.process_request(req)\r\n  File "c:\\docume~1\\voithos\\locals~1\\temp\\easy_install-b06q5m\\Trac-0.12.2-py2.6-win32.egg.tmp\\trac\\prefs\\web_ui.py"_ line 77_ in process_request\r\n    template_ data = chosen_provider.render_preference_panel(req_ panel_id)\r\n  File "build\\bdist.win32\\egg\\acct_mgr\\web_ui.py"_ line 223_ in render_preference_panel\r\n    data = {'account': self._do_account(req)}\r\n  File "build\\bdist.win32\\egg\\acct_mgr\\web_ui.py"_ line 290_ in _do_account\r\n    data.update(self._do_delete(req))\r\n  File "build\\bdist.win32\\egg\\acct_mgr\\web_ui.py"_ line 363_ in _do_delete\r\n    acctmgr.delete_user(user)\r\nNameError: global name 'acctmgr' is not defined\r\n}}}\r\n\r\nTraced it back to a missing `self` when calling a function in `acctmgr` in web_ui.py. From that point on_ it no longer gave an error_ but it would delete all of the records correctly. When looking at the database_ the email record in `session_attribute` still existed_ as did the user's record in `session`.\r\n\r\nFinally managed to fix it by setting the `key` along with the `table` name before passing the SQL to `cursor.execute()`.,defect,closed,normal,AccountManagerPlugin,normal,fixed,db web_ui,,0.12
