PHPackages                             musonic/sabre-accounts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. musonic/sabre-accounts

ActiveLibrary[API Development](/categories/api)

musonic/sabre-accounts
======================

Plugin for SabreDAV library

372PHP

Since Apr 25Pushed 13y ago1 watchersCompare

[ Source](https://github.com/musonic/sabre-accounts)[ Packagist](https://packagist.org/packages/musonic/sabre-accounts)[ RSS](/packages/musonic-sabre-accounts/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SabreAccounts
=============

[](#sabreaccounts)

Accounts plugin for [SabreDAV](https://github.com/evert/SabreDAV) a WebDAV framework for PHP. This plugin allows for the creation of users and principals remotely via HTTP request. If you're not sure what the difference is then take a look here:

Requirements
------------

[](#requirements)

This requires SabreDAV version 1.8 or later.

The assumption is that you have setup a users table in your database as outlined here: [https://code.google.com/p/sabredav/wiki/CalDAV#Database\_setup](https://code.google.com/p/sabredav/wiki/CalDAV#Database_setup)

Installation
------------

[](#installation)

To install this plugin, make sure you have SabreDAV installed using the composer installation instructions. To add this plugin, just add the following line to your composer file in the `requires` section:

```
"musonic/sabre-accounts" : "dev-master"

```

After adding that, you can just run `composer update` to complete the installation.

1. Manually add a 'super\_user' to your users table. This user is the only user authorized to add new users to the database.
2. Update your server.php file (or whatever you have named it)

```
$accountsBackend = new \SabreAccounts\DAV\Accounts\Backend\PDO($pdo);
$account = new \SabreAccounts\DAV\Accounts\Plugin($accountsBackend);
$account->set_superuser('your_super_user');
$server->addPlugin($account);
```

Usage
-----

[](#usage)

### Creating a user

[](#creating-a-user)

The plugin works by sending an HTTP POST request to the server with a custom header and a very simple JSON body. The request MUST include the following:

1. A `Content-Type` header of `application/json`
2. A request body in JSON format that simply contains the username of user you want to add along with a password in digesta1 format. eg.

```
$body = json_encode(array('username'=>$username, 'digesta1'=>$password));
```

### Creating principals

[](#creating-principals)

1. Update your server.php file to use the correct principals backend

```
$principalsBackend = new \SabreAccounts\DAVACL\PrincipalBackend\MusonicPDO(
    $pdo,
    $principalsTable,
    $groupMembersTableName
);
```

2. Update your document tree so that the principals collection is an instance of SabreAccounts\\CalDAV\\Principal\\MusonicCollection
3. To create a new principal you need to make a MKCOL request. The body of the request should be something like this:

```

                        Joe Bloggs
                        joebloggs@example.com

```

Remember to make the request to the principal you are creating. ie /principals/newprincipal, not just /principals/

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/667f5721ed954edf8127f13bf75b7d43153f53b973d68861fdbe4e23ee196aeb?d=identicon)[musonic](/maintainers/musonic)

---

Top Contributors

[![musonic](https://avatars.githubusercontent.com/u/329396?v=4)](https://github.com/musonic "musonic (21 commits)")[![evert](https://avatars.githubusercontent.com/u/178960?v=4)](https://github.com/evert "evert (2 commits)")

### Embed Badge

![Health badge](/badges/musonic-sabre-accounts/health.svg)

```
[![Health](https://phpackages.com/badges/musonic-sabre-accounts/health.svg)](https://phpackages.com/packages/musonic-sabre-accounts)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
