script to batch add to notify table

docwilmot - September 26, 2009 - 23:29

hello all
i've tried to figure this out, but i am not able.
i have notify module installed.
i added a bunch of new users via user import module. all went well except the imported users were not added to the notify database table, so they dont have any default notification preferences set and of course dont get notified.
is there a script i can use to add all my users to the notify table?
i figure this happened because notify implements hook_user like this:

    case 'insert':
      if (isset($edit['notify_decision']) && $edit['notify_decision'] == 1){
        db_query('INSERT INTO {notify} (uid, status, node, teasers, comment) VALUES (%d, %d, %d, %d, %d)', $user->uid, 1, 1, 0, 0);
        $edit['notify_decision'] = NULL;
      }

(so imported users, who would of course not have a 'notify_decision' set, would not be added)
thanks

fixed it through phpmyadmin

docwilmot - September 27, 2009 - 14:46

fixed it through phpmyadmin

-------------------------------------------------
Always be nice to people on the way up; because you'll meet the same people on the way down.
Wilson Mizner (1876 - 1933)

 
 

Drupal is a registered trademark of Dries Buytaert.