PHPackages                             activecollab/user - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. activecollab/user

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

activecollab/user
=================

User interface

4.2.0(2y ago)368.0k↓34.3%3MITPHPPHP &gt;=8.0

Since Oct 15Pushed 2y ago2 watchersCompare

[ Source](https://github.com/activecollab/user)[ Packagist](https://packagist.org/packages/activecollab/user)[ Docs](https://labs.activecollab.com)[ RSS](/packages/activecollab-user/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (4)Versions (11)Used By (3)

User
====

[](#user)

[![Build Status](https://camo.githubusercontent.com/9a956e20731ad95c6a49b5030c1b4f9c52cc5bf1eaa648a8a891278e3ccc0875/68747470733a2f2f7472617669732d63692e6f72672f616374697665636f6c6c61622f757365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/activecollab/user)

User interface describes a single user:

1. ID (if available),
2. First name,
3. Last name,
4. Email address.

First and last name can be parsed from full name, or full name can be assembled from first and last name, depending on strategy that you select for implementation.

Identified and Unidentified Visitors
------------------------------------

[](#identified-and-unidentified-visitors)

This library offers two solid classes: `ActiveCollab\User\UnidentifiedVisitor` is a visitor that we know nothing about, and `ActiveCollab\User\IdentifiedVisitor` which describe a single user who announces their identity by providing their email address and optionally full name.

```
$user = new ActiveCollab\User\IdentifiedVisitor('Ilija Studen', 'ilija@example.com');

print $user->getFirstName() . "\n";
print $user->getLastName() . "\n";
print $user->formatName(ActiveCollab\User\UserInterface::NAME_INITIALS) . "\n";
```

Users with Accounts
-------------------

[](#users-with-accounts)

If the app has a concept of users with accounts, these classes should implement `ActiveCollab\User\UserInterface` and provide access to required properties:

1. User ID,
2. User's email address,
3. User's first and last name or full name.

Depending on what you have stored for #3, you can use one of the two traits to get most of the UserInterface implementation pasted to your user classes:

1. `ActiveCollab\User\UserInterface\ImplementationUsingFirstAndLastName`
2. `ActiveCollab\User\UserInterface\ImplementationUsingFullName`

Serialization
-------------

[](#serialization)

All instances that implement `ActiveCollab\User\UserInterface` can be serialized to JSON:

```
$user = new ActiveCollab\User\IdentifiedVisitor('Ilija Studen', 'ilija@example.com');
print_r(json_decode(json_encode($user), true));
```

will output:

```
(
    [id] => 0
    [class] => ActiveCollab\User\IdentifiedVisitor
    [first_name] => Ilija
    [last_name] => Studen
    [full_name] => Ilija Studen
    [email] => ilija@example.com
)

```

Comparing Users
---------------

[](#comparing-users)

`UserInterface::is()` method is handy when you need to check if a particular user instance is the same person as another instance:

```
$user1 = new ActiveCollab\User\IdentifiedVisitor('John Doe', 'john@example.com');
$user2 = new ActiveCollab\User\IdentifiedVisitor('Jane Doe', 'jane@example.com');

if ($user1->is($user2)) {
    print "Same person\n";
} else {
    print "Not the same person\n";
}
```

Users with accounts (ID &gt; 0) are compared by their ID, and visitors without an account are compared by their email address. Comparisons are not mixed, so user with account will never be identified as visitor, even when their email addresses match.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity74

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~308 days

Recently: every ~626 days

Total

10

Last Release

1088d ago

Major Versions

1.1.0 → 2.0.02016-05-14

2.1.0 → 3.0.02016-07-14

3.0.0 → v4.0.x-dev2017-07-08

PHP version history (3 changes)1.0.0PHP &gt;=5.6.0

v4.0.x-devPHP &gt;=7.1

4.0.1PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/729914?v=4)[Ilija Studen](/maintainers/ilijastuden)[@ilijastuden](https://github.com/ilijastuden)

---

Top Contributors

[![ilijastuden](https://avatars.githubusercontent.com/u/729914?v=4)](https://github.com/ilijastuden "ilijastuden (38 commits)")

---

Tags

activecollab

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/activecollab-user/health.svg)

```
[![Health](https://phpackages.com/badges/activecollab-user/health.svg)](https://phpackages.com/packages/activecollab-user)
```

###  Alternatives

[symfony/asset

Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files

3.2k172.1M952](/packages/symfony-asset)[oomphinc/composer-installers-extender

Extend the composer/installers plugin to accept any arbitrary package type.

23728.7M390](/packages/oomphinc-composer-installers-extender)[kelunik/certificate

Access certificate details and transform between different formats.

10938.3M8](/packages/kelunik-certificate)

PHPackages © 2026

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