mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:10:11 +00:00
Simplified the Contact update
This commit is contained in:
parent
c9666a9f1d
commit
be0a102333
2 changed files with 22 additions and 62 deletions
|
@ -1468,10 +1468,12 @@ class Contact extends BaseObject
|
|||
'url' => $data['url'],
|
||||
'nurl' => Strings::normaliseLink($data['url']),
|
||||
'name' => $data['name'],
|
||||
'nick' => $data['nick'],
|
||||
'baseurl' => $data['baseurl']
|
||||
'nick' => $data['nick']
|
||||
];
|
||||
|
||||
if (!empty($data['baseurl'])) {
|
||||
$updated['baseurl'] = $data['baseurl'];
|
||||
}
|
||||
if (!empty($data['keywords'])) {
|
||||
$updated['keywords'] = $data['keywords'];
|
||||
}
|
||||
|
@ -1500,7 +1502,7 @@ class Contact extends BaseObject
|
|||
}
|
||||
|
||||
// Only fill the pubkey if it had been empty before. We have to prevent identity theft.
|
||||
if (empty($contact['pubkey'])) {
|
||||
if (empty($contact['pubkey']) && !empty($data['pubkey'])) {
|
||||
$updated['pubkey'] = $data['pubkey'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue