public function addUserByUniqueId(int $authorId, string $uniqueId, bool $inCharge = false) : bool
{
$this->db->beginTransaction();
$userID = (int) $this->db->cell('SELECT userid FROM airship_users WHERE uniqueid = ?', $uniqueId);
if (empty($userID)) {
throw new UserFeedbackException(\__('There is no user with this Public ID.'));
}
if ($this->userHasAccess($authorId, $userID)) {
throw new UserFeedbackException(\__('This User already has access to this Author.'));
}
$this->db->insert('hull_blog_author_owners', ['authorid' => $authorId, 'userid' => $userID, 'in_charge' => $inCharge]);
return $this->db->commit();
}