$newuid = last_insert_id();\r
//~ $newuid = 1;\r
\r
-\r
+ // Generate a new guid for the account. Otherwise there will be problems with diaspora\r
+ q("UPDATE `user` SET `guid` = '%s' WHERE `uid` = %d",\r
+ dbesc(generate_user_guid()), intval($newuid));\r
\r
foreach ($account['profile'] as &$profile) {\r
foreach ($profile as $k => &$v) {\r