mirror of
https://github.com/friendica/friendica
synced 2025-04-22 23:50:13 +00:00
Handles issue 6122 - the self contact will be updated when it seems to be invalid
This commit is contained in:
parent
6f8c9a08a1
commit
faa30adf68
2 changed files with 19 additions and 5 deletions
|
@ -98,6 +98,19 @@ class User
|
|||
if (!DBA::isResult($r)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($r['nickname'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if the returned data is valid, otherwise fix it. See issue #6122
|
||||
$url = System::baseUrl() . '/profile/' . $r['nickname'];
|
||||
$addr = $r['nickname'] . '@' . substr(System::baseUrl(), strpos(System::baseUrl(), '://') + 3);
|
||||
|
||||
if (($addr != $r['addr']) || ($r['url'] != $url) || ($r['nurl'] != Strings::normaliseLink($r['url']))) {
|
||||
Contact::updateSelfFromUserID($uid);
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue