PHPackages                             oenstrom/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. [Framework](/categories/framework)
4. /
5. oenstrom/user

ActiveLibrary[Framework](/categories/framework)

oenstrom/user
=============

An user module for the Anax framework.

1.0.6(8y ago)038MITPHPPHP &gt;=5.6

Since Sep 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/oenstrom/anax-user)[ Packagist](https://packagist.org/packages/oenstrom/user)[ Docs](https://github.com/oenstrom/anax-user/)[ RSS](/packages/oenstrom-user/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (8)Versions (8)Used By (0)

Anax user
=========

[](#anax-user)

[![Build Status](https://camo.githubusercontent.com/36e52ec49b091badaac9b2a308d524b037d3a20f9a23c206c80cfbd291433121/68747470733a2f2f7472617669732d63692e6f72672f6f656e7374726f6d2f616e61782d757365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/oenstrom/anax-user)[![CircleCI](https://camo.githubusercontent.com/467fe3b7befc3db4e18b9db786017ad72409623c383159579dafb7aaa6bf1546/68747470733a2f2f636972636c6563692e636f6d2f67682f6f656e7374726f6d2f616e61782d757365722e7376673f7374796c653d737667)](https://circleci.com/gh/oenstrom/anax-user)[![Build Status](https://camo.githubusercontent.com/3ea49b1ae4957915d5f3b7f935a0c51dd84b16d6f8497eaebd7c26354955b26e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f656e7374726f6d2f616e61782d757365722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/oenstrom/anax-user/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8936f4675f5a13840fdde5fd5317c4e9de3a6c5be9cf29418b52f59502dbe165/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f656e7374726f6d2f616e61782d757365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/oenstrom/anax-user/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/794c9445321a719aa30e3b64c831cc440254aaf18634ea4e3553b516ee5fc05f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f656e7374726f6d2f616e61782d757365722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/oenstrom/anax-user/?branch=master)

Anax user module implementing user and admin functionality.

Install
-------

[](#install)

Install the module with composer and then integrate the module with your Anax installation.

### Install with composer

[](#install-with-composer)

```
composer require oenstrom/user

```

### Automatic configuration

[](#automatic-configuration)

You can automatically configurate most of the module using the makefile. The makefile is located in `vendor/oenstrom/user/`, make sure you are in that directory before running the make command.

```
# cd vendor/oenstrom/user
make install-module

```

### Manual configuration

[](#manual-configuration)

If you want to manually copy the files you can do so from the root directory of your Anax installation with the following commands.

```
rsync -a vendor/oenstrom/user/config/di/* config/di/
rsync -a vendor/oenstrom/user/config/route/* config/route/
rsync -a vendor/oenstrom/user/config/database.php config/
rsync -a vendor/oenstrom/user/view/user view/

```

### Setup database

[](#setup-database)

Execute the SQL-file `sql/setup.sql` to create a new database called `anaxuser` and a new table with two users: `admin:admin` and `doe:doe`If you already have a database, just edit the SQL-file or use the SQL code below.

```
CREATE TABLE User (
    `id`        INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
    `role`      VARCHAR(20) NOT NULL DEFAULT 'user',
    `username`  VARCHAR(80) UNIQUE NOT NULL,
    `email`     VARCHAR(255) UNIQUE NOT NULL,
    `password`  VARCHAR(255) NOT NULL,
    `created`   TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    `deleted`   DATETIME
) ENGINE INNODB CHARACTER SET utf8 COLLATE utf8_swedish_ci;

INSERT INTO User(role, username, email, password) VALUES
('admin', 'admin', 'admin@admin.com', '$2y$10$Njbsb6l8TCLdvHUcS/65IOcEVARQGICBYqDqx8843aPgpVdlYedrC'),
('user', 'doe', 'user@user.com', '$2y$10$26KgRWjs3F654.yHpsYYDO4sd86ksNN1E8zpQ2yHMA/yx33tV/ACq');

```

Now update the file `config/database.php` with settings and credentials for your SQL server.

### Test it

[](#test-it)

When all of the above is done you can test it with the following routes.

```
user/register               Register a new account
user/login                  Login with your account
user/logout                 Logout from your account

# Protected from unauthenticated users
user/profile                Display the user profile

# Protected from unauthorized users
user/admin/users            Display all users
user/admin/users/add        Create a new user
user/admin/update/:id       Update an user with the provided id
user/admin/delete/:id       Delete an user with the provided id

```

License
-------

[](#license)

This software carries a MIT license.

```

  Copyright (c) 2017 Olof Enström (olof.enstrom@gmail.com)

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Total

7

Last Release

3126d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18dff9f3bc63ed049d78978154334c484a8d17c7ee9db93129404ebee77e445c?d=identicon)[oenstrom](/maintainers/oenstrom)

---

Top Contributors

[![oenstrom](https://avatars.githubusercontent.com/u/18578458?v=4)](https://github.com/oenstrom "oenstrom (14 commits)")

---

Tags

frameworkmicrousermvceducation

### Embed Badge

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

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

PHPackages © 2026

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