Airship\Cabin\Bridge\Blueprint\Author::updateAuthor PHP Method

updateAuthor() public method

Update an author profile
public updateAuthor ( integer $authorId, array $post ) : boolean
$authorId integer
$post array
return boolean
    public function updateAuthor(int $authorId, array $post) : bool
    {
        $this->db->beginTransaction();
        $updates = ['name' => $post['name'] ?? '', 'byline' => $post['byline'] ?? '', 'bio_format' => $post['format'] ?? 'Markdown', 'biography' => $post['biography'] ?? ''];
        if (!empty($post['slug'])) {
            if ($this->updateAuthorSlug($authorId, $post)) {
                $updates['slug'] = $post['slug'];
            }
        }
        $this->db->update('hull_blog_authors', $updates, ['authorid' => $authorId]);
        return $this->db->commit();
    }