function generate_user_guid() {
$found = true;
do {
- $guid = random_string(16);
+ $guid = get_guid(32);
$x = q("SELECT `uid` FROM `user` WHERE `guid` = '%s' LIMIT 1",
dbesc($guid)
);
//~ $newuid = 1;\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", generate_user_guid(), $newuid);\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