PHPackages                             filipbs/f-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. filipbs/f-user

ActiveLibrary[Framework](/categories/framework)

filipbs/f-user
==============

fUser package made for dbwebb.se

v1.0(9y ago)06MITPHPPHP &gt;=5.4

Since Apr 23Pushed 9y agoCompare

[ Source](https://github.com/FilipBrannlundStal/fUser)[ Packagist](https://packagist.org/packages/filipbs/f-user)[ Docs](http://dbwebb.se)[ RSS](/packages/filipbs-f-user/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

fUser
=====

[](#fuser)

fUser model is based on dbwebb.se user package for Anax mvc. fUser has improved features containing:

- Loginsystem
- Character sensetive search for searching users

{info:title=Useful Information}Make sure you have database file in config. E.g /config/database\_mysql.php{info}

Install
=======

[](#install)

In index file make sure DI is set to UserController Create DI for database

```
setShared('db',">```
    $db = new \Mos\Database\CDatabaseBasic();
    $db->setOptions(require ANAX_APP_PATH . 'config/database_mysql.php');
    $db->connect();
    return $db;
});

```
```

Create a default router

```
router->add('user',">```
    $app->theme->setTitle("Visa alla användare");
    $app->dispatcher->forward([
        'controller' => 'user',
        'action'     => 'list',
    ]);
});

```
```

Auto generate table
-------------------

[](#auto-generate-table)

{tip:title=Helpful Hint}Create an route to autogenerate database table with default users.

```
$app->router->add('setup', function() use ($app) {

    //$app->db->setVerbose();

    $app->db->dropTableIfExists('user')->execute();

    $app->db->createTable(
        'user',
        [
            'id' => ['integer', 'primary key', 'not null', 'auto_increment'],
            'acronym' => ['varchar(20)', 'unique', 'not null'],
            'email' => ['varchar(80)'],
            'name' => ['varchar(80)'],
            'password' => ['varchar(255)'],
            'created' => ['datetime'],
            'updated' => ['datetime'],
            'deleted' => ['datetime'],
            'active' => ['datetime'],
        ]
    )->execute();
		$app->db->insert(
        'user',
        ['acronym', 'email', 'name', 'password', 'created', 'active']
    );

    $now = gmdate('Y-m-d H:i:s');

    $app->db->execute([
        'admin',
        'admin@dbwebb.se',
        'Administrator',
        password_hash('admin', PASSWORD_DEFAULT),
        $now,
        $now
    ]);

    $app->db->execute([
        'doe',
        'doe@dbwebb.se',
        'John/Jane Doe',
        password_hash('doe', PASSWORD_DEFAULT),
        $now,
        $now
    ]);
});

```

Enter /setup and your database is ready to go {tip}

Anax-MVC
========

[](#anax-mvc)

[![Latest Stable Version](https://camo.githubusercontent.com/16894ac439eae0043341c694f28e60cead24e99d657f930f980c2ece6e199f55/68747470733a2f2f706f7365722e707567782e6f72672f6c656170686c792f636172742d62756e646c652f76657273696f6e2e706e67)](https://packagist.org/packages/anax/mvc)[![Build Status](https://camo.githubusercontent.com/a26136fc2a935fcc0002823935ff7318ce6b87ed62248ad8aa6dfce6465591ea/68747470733a2f2f7472617669732d63692e6f72672f6d6f736274682f416e61782d4d56432e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mosbth/Anax-MVC)[![Code Coverage](https://camo.githubusercontent.com/e18117ad6550ab77426aec8a7f76b129922f87cc225fb6df4e416a9bd384ac4b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f736274682f416e61782d4d56432f6261646765732f636f7665726167652e706e673f733d66393939616231393631363834613931303530623039353638326637616237613133636362353334)](https://scrutinizer-ci.com/g/mosbth/Anax-MVC/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/e550299ae9bf8cf08d5afcb29521814266744e346e6a9355fac9ce2060b27693/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f736274682f416e61782d4d56432f6261646765732f7175616c6974792d73636f72652e706e673f733d31633266633161663064663766623765653165346633373961383132353335383361373530323937)](https://scrutinizer-ci.com/g/mosbth/Anax-MVC/)

A PHP-based and MVC-inspired (micro) framework / webbtemplate / boilerplate for websites and webbapplications.

Read article about it here: ["Anax som MVC-ramverk"](http://dbwebb.se/kunskap/anax-som-mvc-ramverk) and here ["Bygg en me-sida med Anax-MVC"](http://dbwebb.se/kunskap/bygg-en-me-sida-med-anax-mvc).

Builds upon Anax-base, read article about Anax-base ["Anax - en hållbar struktur för dina webbapplikationer"](http://dbwebb.se/kunskap/anax-en-hallbar-struktur-for-dina-webbapplikationer) to get an overview of its none-MVC variant.

By Mikael Roos, .

License
-------

[](#license)

This software is free software and carries a MIT license.

Use of external libraries
-------------------------

[](#use-of-external-libraries)

The following external modules are included and subject to its own license.

### Modernizr

[](#modernizr)

- Website:
- Version: 2.6.2
- License: MIT license
- Path: included in `webroot/js/modernizr.js`

### PHP Markdown

[](#php-markdown)

- Website:
- Version: 1.4.0, November 29, 2013
- License: PHP Markdown Lib Copyright © 2004-2013 Michel Fortin
- Path: included in `3pp/php-markdown`

History
-------

[](#history)

\###History for Anax-MVC

v2.0.5\* (2016-04-06)

- Enhance CResponse::redirect() to use framework urls, fix #22.

v2.0.5 (2016-01-15)

- Codestyle using phpcs.
- Enhancing verbosity on exception messages by printing out $di.
- Display valid routes and controllers to aid in 404 debugging.

v2.0.4 (2015-04-05)

- Navbar to display current item even if ? is present, fix 15.
- Updated composer.json and removed dependency to coverall.io.
- updated .travis.yml to remove dependency to coverall.io and do not install composer.phar.
- Adding example for shortcodes \[BASEURL\], \[RELURL\] and \[ASSET\].
- Adding example code on using forward and view creation, fix #13.
- `CDispatcherBasic->foward()` now returns a value, fix #12.
- Throw exception when headers already sent, fix #11.
- Removed testcase where exception was not thrown in creating session on hvm.

v2.0.3 (2015-01-12)

- Adding autoloader to composer.json to enable download from packagist using composer and require.
- Add PHP 5.6 as testenvironment in Travis.
- Testcases for \\Anax\\Session\\CSession.
- Testcases for \\Anax\\DI\\CDI.
- Improved exception when creation of service failes in $di.
- CNavbar now works for descendants of a menuitem.
- Correcting example `webroot/test/navigation-bar.php` to correctly show current menu item.
- Improved error messages in `CDispatcherbasic`.
- Improved errorhandling in trait `TInjectable`, now throwing more verbose exceptions on which class is using the trait.

v2.0.2 (2014-10-25)

- Added example for navigation bar and how to create urls in navbar.
- Add default route handler for route defined as '\*'.
- Added empryt directory for app-specific file content `app/content`.
- Minor fixes to error messages.
- Several minor fixes to code formatting.
- Added `CUrl::createRelative()` for urls relative current frontcontroller.
- Reorganized and added testprograms in `webroot/test`.
- Improved documentation in `docs/documentation` and `webroot/docs.php`.
- Added config-file for phpunit `phpunit.xml.dist`.
- Added `phpdoc.dist.xml`.
- Enhanced `Anax\Navigation\CNavBar` with class in menu item.
- Added phpdocs to `docs/api`.

v2.0.1 (2014-10-17)

- Updates to match comments example.
- Introduced and corrected bug (issue #1) where exception was thrown instead of presenting a 404-page.
- Added `CSession::has()`.
- Corrected bug #2 in `CSession->name` which did not use the config-file for naming the session.
- Added `Anax\MVC\CDispatcherBasic` calling `initialize` om each controller.
- Added exception handling to provide views for 403, 404 and 500 http status codes and added example program in `webroot/error.php`.
- Added `docs` to init online documentation.
- Adding flash message (not storing in session).
- Adding testcases for CDispatcherBasic and now throwing exceptions from `dispatch()` as #3.
- Adding example for integrating CForm in Anax MVC and as a result some improvements to several places.
- Adding check to `Anax\MVC\CDispatcherBasic` to really check if the methods are part of the controller class and not using `__call()`.
- Improved error handling in `Anax\MVC\CDispatcherBasic` and testcase in `webroot/test_errormessages.php`.

v2.0.0 (2014-03-26)

- Cloned Anax-MVC and preparing to build Anax-MVC.
- Added autoloader for PSR-0.
- Not throwing exception in standard anax autoloader.
- Using anonomous functions in `bootstrap.php` to set up exception handler and autoloader.
- Added `$anax['style']` as inline style in `config.php` and `index.tpl.php`.
- Added unit testing with phpunit.
- Added automatic build with travis.
- Added codecoverage reports on coveralls.io.
- Added code quality through scrutinizer-ci.com.
- Major additions of classes to support a framework using dependency injections and service container.

\###History for Anax-base

v1.0.3 (2013-11-22)

- Naming of session in `webroot/config.php` allows only alphanumeric characters.

v1.0.2 (2013-09-23)

- Needs to define the ANAX\_INSTALL path before using it. v1.0.1 did not work.

v1.0.1 (2013-09-19)

- `config.php`, including `bootstrap.php` before starting session, needs the autoloader()`.

v1.0.0 (2013-06-28)

- First release after initial article on Anax.

```
 .
..:  Copyright (c) 2013 - 2014 Mikael Roos, me@mikaelroos.se

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3303d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00c75c0bda71302619c637b66e3794dec235f0e9cfa10f6c77e6380fc468d54e?d=identicon)[FilipBrannlundStal](/maintainers/FilipBrannlundStal)

---

Tags

frameworkmicromvcboilerplateeducationfUser

### Embed Badge

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

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

PHPackages © 2026

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