- // Is the contact the owner? Then fetch the private key
- if (!$contact['self'] || ($contact['uid'] == 0)) {
- logger("No owner post, so not storing signature", LOGGER_DEBUG);
- return false;
- }
-
- $user = DBA::selectFirst('user', ['prvkey'], ['uid' => $contact["uid"]]);
- if (!DBA::isResult($user)) {
- return false;
- }
-
- $contact["uprvkey"] = $user['prvkey'];
-
- $item = Item::selectFirst([], ['id' => $post_id]);
- if (!DBA::isResult($item)) {
+ $owner = User::getOwnerDataById($uid);
+ if (empty($owner)) {
+ Logger::log("No owner post, so not storing signature", Logger::DEBUG);