Airship\Cabin\Bridge\Landing\Author::manageAuthorUsers PHP Method

manageAuthorUsers() protected method

Add/remove users, toggle ownership status.
protected manageAuthorUsers ( integer $authorId, array $post ) : boolean
$authorId integer
$post array
return boolean
    protected function manageAuthorUsers(int $authorId, array $post) : bool
    {
        try {
            if (!empty($post['btnAddUser'])) {
                return $this->author->addUserByUniqueId($authorId, $post['add_user'], !empty($post['in_charge']));
            } elseif (!empty($post['remove_user'])) {
                return $this->author->removeUserByUniqueId($authorId, $post['remove_user']);
            } elseif (!empty($post['toggle_owner'])) {
                return $this->author->toggleOwnerStatus($authorId, $post['toggle_owner']);
            }
        } catch (UserFeedbackException $ex) {
            $this->storeLensVar('form_error', (string) $ex);
        }
        return false;
    }