When all existing usernodes have been updated by usernode_comment.module to readable and writable comments (node->comment=2), the cron process sets most usernodes back to 0.

EXCEPT: There are unchanged usernodes in node table for:
- Admin (uid 1),
- wrong users with uid 0 (and therefore having no entry in users table) and
- an deleted user who still has a usernode but no entry in users table (uid 77).

I commented out cron hook in usernode module, but that made no change to that effect. So which module has a cron process that changes the comment values in usernodes?

Comments

marcor’s picture

Assigned: Unassigned » marcor

Additionally subscriptions module sends out usernode notifications each time a user object is saved. Very annoying, but gives a hint of whats going wrong here.

marcor’s picture

Status: Active » Patch (to be ported)

Each time the cron process is run and another module tries to save some data to the users table, this code is run:

<?php
      case 'update':
        // Save usernode options and delete values from form array
        // before usernode gets saved
        $node = usernode_get_node(&$user);
        $node->comment = $edit['comment'];
        node_save($node);
        unset($edit['comment']);
?>

It was intended tp run this code only on send of the form. Operation must be 'submit' instead of 'update'.

<?php
      case 'submit':
        // Save usernode options and delete values from form array
        // before usernode gets saved
        $node = usernode_get_node(&$user);
        $node->comment = $edit['comment'];
        node_save($node);
        unset($edit['comment']);
?>

Will be fixed in the next 5.x-dev-version.

marcor’s picture

Status: Patch (to be ported) » Fixed

Fixed in current development snapshot.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.