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(3y ago)471.4k↓50.3%3MITPHPPHP &gt;=8.0

Since Oct 15Pushed 2mo 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 2d ago

READMEChangelog (10)Dependencies (4)Versions (13)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

48

—

FairBetter than 93% of packages

Maintenance56

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity75

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 ~348 days

Recently: every ~316 days

Total

12

Last Release

78d ago

Major Versions

1.1.0 → 2.0.02016-05-14

2.1.0 → 3.0.02016-07-14

3.0.0 → 4.0.02019-06-23

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

4.0.0PHP &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

[umpirsky/symfony-upgrade-fixer

Analyzes your Symfony project and tries to make it compatible with the new version of Symfony framework.

273492.9k](/packages/umpirsky-symfony-upgrade-fixer)[bitbag/shipping-export-plugin

Shipping data export environment for Sylius platform applications

32117.4k18](/packages/bitbag-shipping-export-plugin)[imi/laravel-transsid

Trans\_SID (Session IDs in URLs) for Laravel 5-8 Projects

183.5k](/packages/imi-laravel-transsid)

PHPackages © 2026

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