PHPackages                             jestillore/php-openfire-userservice - 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. jestillore/php-openfire-userservice

ActiveLibrary

jestillore/php-openfire-userservice
===================================

0294PHP

Since Apr 24Pushed 11y ago3 watchersCompare

[ Source](https://github.com/jestillore/php-openfire-userservice)[ Packagist](https://packagist.org/packages/jestillore/php-openfire-userservice)[ RSS](/packages/jestillore-php-openfire-userservice/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-openfire-userservice
========================

[](#php-openfire-userservice)

Openfire Userservice PHP Wrapper

require `"jestillore/php-openfire-userservice": "dev-master"`

```
use Jestillore\PhpOpenfireUserservice\PHPOpenfireUserservice;

$us = new PHPOpenfireUserservice;
$us->setEndpoint('http://example.com:9090/plugins/userService');

```

There are two available authorization type:

- HTTP Basic Authentication
- Shared Key

To use HTTP Basic Authentication

```
$us->setAuthType(PHPOpenfireUserservice::AUTH_BASIC)
   ->setUsername('username')
   ->setPassword('password');

```

To use Shared key

```
$us->setAuthType(PHPOpenfireUserservice::AUTH_SHARED_KEY)
   ->setSharedKey('thisisthesharedkey');

```

Get all users
=============

[](#get-all-users)

```
$us->getAllUsers();

```

Returns an array of users

```
[
    {
        "username": "user1",
        "name": "User One",
        "properties": []
    },
    {
    	"username": "user2",
    	"name": "User Two",
    	"properties": []
    }
]

```

Get user information
====================

[](#get-user-information)

```
$us->getUser('username');

```

Returns user object

```
{
    "username": "user1",
    "name": "User One",
    "email": "user@one.com",
    "properties": []
}

```

Create user
===========

[](#create-user)

```
$user1 = array(
    'username' => 'user1',
    'password' => 'password1'
);

$user2 = array(
    'username' => 'user2',
    'password' => 'password2',
    'name' => 'User Two',
    'email' => 'user@two.com'
);

$res1 = $us->createUser($user1);
$res2 = $us->createUser($user2);

```

Returns an instance of Response class.

```
if($res1->isSuccess()) {
    // account created successfully
}
else {
    // account was not created
    $res1->getMessage(); // information about the error
}

```

Delete user
===========

[](#delete-user)

```
$res = $us->deleteUser('username');
if ($res->isSuccess()) {
    // account deleted
}
else {
    // account not deleted
}

```

Update user
===========

[](#update-user)

```
$user = array(
    'password' => 'password1'
);
$res = $us->updateUser($user);
if($res->isSuccess()) {
    // account updated
}
else {
    // account not updated
}

```

Lock user
=========

[](#lock-user)

```
$res = $us->lockUser('username');
if($res->isSuccess()) {
    // account locked
}
else {
    // account not locked
}

```

Unlock user
===========

[](#unlock-user)

```
$res = $us->unlockUser('username');
if($res->isSuccess()) {
    // account unlocked
}
else {
    // account not unlocked
}

```

Get user groups
===============

[](#get-user-groups)

```
$groups = $us->getUserGroups('jestillore');

```

Returns an array of groups

```
[
    "group1",
    "group2"
]

```

Add user to groups
==================

[](#add-user-to-groups)

```
$groups = array(
	'group1',
	'group2'
);
$res = $us->addUserToGroups('username', $groups);
if($res->isSuccess()) {
    // user added to groups
}
else {
    // user not added to groups
}

```

TODO

- Remove user from groups
- Get user by property
- Get Roster
- Add Roster Entry
- Delete Roster Entry
- Update Roster Entry

###  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 100% 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/6522dbe642bf5afbde727b895988e2f14dd0ac2e5c263c7076b0fb969775b76d?d=identicon)[jestillore](/maintainers/jestillore)

---

Top Contributors

[![mmlado](https://avatars.githubusercontent.com/u/10460806?v=4)](https://github.com/mmlado "mmlado (3 commits)")

### Embed Badge

![Health badge](/badges/jestillore-php-openfire-userservice/health.svg)

```
[![Health](https://phpackages.com/badges/jestillore-php-openfire-userservice/health.svg)](https://phpackages.com/packages/jestillore-php-openfire-userservice)
```

PHPackages © 2026

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