Index: realname_generate.module
===================================================================
--- realname_generate.module	(revision 945)
+++ realname_generate.module	(working copy)
@@ -160,12 +160,13 @@ function realname_generate_user($op, &$e
  * If using the content_profile module, you can update username automatically when a profile field is updated.
  * @TODO figure out what to do if an there is a validation error when re-generating a username.
  */
-function realname_generate_nodeapi(&$node, $op) {
+function realname_generate_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
+  $array_node = (array) $node;
   if ($op === 'update' && REALNAME_MODULE === 'content_profile' &&
       variable_get('realname_generate_username', NULL) &&
       $node->type === variable_get('realname_profile_type', NULL) &&
       variable_get('realname_generate_update_names', NULL) &&
-      $new_name = realname_generate_make_name($node->uid, $node)) {
+      $new_name = realname_generate_make_name($node->uid, $array_node)) {
     // Validate the generated username.
     if ($error = user_validate_name($new_name)) {
       // There was a validation problem with the new username, so it was not updated
@@ -322,7 +323,7 @@ function realname_generate_make_name($ui
 	// Make a username with the fields from other modules
   // @TODO Turn this into hooks with a module_invoke_all, and write default hooks for content_profile and profile
   if (arg(0) == 'user' && is_numeric(arg(1)) &&  arg(2) == 'edit' && !arg(3)) {
-    // We are editing the user account at user/[uid]/edit 
+    // We are editing the user account at user/[uid]/edit
     if (!($edit['submitted'])) {
       $edit['_account'] = user_load($uid);
     }
