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 today

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 21% 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://avatars.githubusercontent.com/u/329396?v=4)[musonic](/maintainers/musonic)[@musonic](https://github.com/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

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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