Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
While trying to uninstall the usernode module, I ran into an error: "call to undefined function usernode_delete_node()". That function is defined in usernode.module, but after you un-check the box on the modules page, that file isn't included anymore. I added an include once to fix this problem.
This loop:
while ($user = db_fetch_object($result)) {
usernode_delete_node($user);
}
now looks like this...
while ($user = db_fetch_object($result)) {
// after the module is uninstalled via admin > modules, the usernode.module file is nolonger
// included, so calling usdenode_delete_node() generates an "undefined function" error
// I aded the include_once so the "uninstall" feature would work
include_once('usernode.module');
usernode_delete_node($user);
}
Patch also attached, please review.
Jen
Comment | File | Size | Author |
---|---|---|---|
usernode.install.patch | 627 bytes | jenlampton |
Comments
Comment #1
fagothanks, fixed
Comment #2
(not verified) CreditAttribution: commented