Horde_Share_Base::countShares PHP Method

countShares() public method

Returns the number of shares that $userid has access to.
public countShares ( string $userid, integer $perm = Horde_Perms::SHOW, mixed $attributes = null ) : integer
$userid string The userid of the user to check access for.
$perm integer The level of permissions required.
$attributes mixed Restrict the shares counted to those matching $attributes. An array of attribute/values pairs or a share owner username.
return integer The number of shares
    public function countShares($userid, $perm = Horde_Perms::SHOW, $attributes = null)
    {
        return count($this->_listShares($userid, array('perm' => $perm, 'attributes' => $attributes)));
    }