mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
Issue 14349: Fix profile page for unrelated contacts
This commit is contained in:
parent
66e9807876
commit
131e330e61
8 changed files with 440 additions and 476 deletions
|
@ -100,12 +100,12 @@ class UpdateCredentials extends BaseApi
|
|||
User::update($user, $uid);
|
||||
Profile::update($profile, $uid);
|
||||
|
||||
$cdata = Contact::getPublicAndUserContactID($owner['id'], $uid);
|
||||
if (empty($cdata)) {
|
||||
$ucid = Contact::getUserContactId($owner['id'], $uid);
|
||||
if (!$ucid) {
|
||||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
||||
$account = DI::mstdnAccount()->createFromContactId($cdata['user'], $uid);
|
||||
$account = DI::mstdnAccount()->createFromContactId($ucid, $uid);
|
||||
$this->response->addJsonContent($account->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,13 +45,13 @@ class VerifyCredentials extends BaseApi
|
|||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
||||
$cdata = Contact::getPublicAndUserContactID($self['id'], $uid);
|
||||
if (empty($cdata)) {
|
||||
$ucid = Contact::getUserContactId($self['id'], $uid);
|
||||
if (!$ucid) {
|
||||
DI::mstdnError()->InternalError();
|
||||
}
|
||||
|
||||
// @todo Support the source property,
|
||||
$account = DI::mstdnAccount()->createFromContactId($cdata['user'], $uid);
|
||||
$account = DI::mstdnAccount()->createFromContactId($ucid, $uid);
|
||||
$this->response->addJsonContent($account->toArray());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue