Browse Source

Diaspora now uses a 32 digit guid.

pull/1813/head
Michael Vogel 5 years ago
parent
commit
bb7ec55f1f
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      include/text.php
  2. +2
    -1
      include/uimport.php

+ 1
- 1
include/text.php View File

@ -1788,7 +1788,7 @@ function return_bytes ($size_str) {
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)
);


+ 2
- 1
include/uimport.php View File

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


Loading…
Cancel
Save