Added method AddressBookRevokeSignature
This commit is contained in:
parent
051ad11aba
commit
e63e7eb0d7
2 changed files with 109 additions and 0 deletions
|
@ -371,6 +371,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
public static function removeContactSigningKey(string|ContactDatabaseRecord $contactUuid, string $signatureUuid): void
|
||||
{
|
||||
if($contactUuid instanceof ContactDatabaseRecord)
|
||||
{
|
||||
$contactUuid = $contactUuid->getUuid();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$statement = Database::getConnection()->prepare('DELETE FROM contacts_known_keys WHERE contact_uuid=:contact_uuid AND signature_uuid=:signature_uuid');
|
||||
$statement->bindParam(':contact_uuid', $contactUuid);
|
||||
$statement->bindParam(':signature_uuid', $signatureUuid);
|
||||
$statement->execute();
|
||||
}
|
||||
catch(PDOException $e)
|
||||
{
|
||||
throw new DatabaseOperationException('Failed to remove a signing key from a contact in the database', $e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a signing key UUID exists for a contact in the database.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue