PHPackages                             sersid/yii2-user-profile - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. sersid/yii2-user-profile

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

sersid/yii2-user-profile
========================

Yii2 user profile

184PHP

Since Mar 17Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Sersid/yii2-user-profile)[ Packagist](https://packagist.org/packages/sersid/yii2-user-profile)[ RSS](/packages/sersid-yii2-user-profile/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 User Profile
=================

[](#yii2-user-profile)

Manage configuration from database

Installation
------------

[](#installation)

### One

[](#one)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist sersid/yii2-user-profile "dev-master"
```

or add

```
"sersid/yii2-user-profile": "dev-master"

```

to the require section of your `composer.json` file.

### Two

[](#two)

Applying migrations

```
yii migrate --migrationPath=@vendor/sersid/yii2-user-profile/migrations

```

### Three

[](#three)

```
$config = [
    ...
    'components' => [
        ...
        'profile' => [
            'class' => 'sersid\profile\components\Profile',
        ],
    ]
];
```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

#### Set

[](#set)

```
Yii::$app->profile->set('foo', 'bar');
Yii::$app->profile->set(['foo' => 'bar']);
```

#### Get

[](#get)

```
Yii::$app->profile->get('foo'); // bar
```

#### Model

[](#model)

```
Yii::$app->profile->model(); // sersid\profile\models\Model
```

Create fields
-------------

[](#create-fields)

### One

[](#one-1)

Create migration

```
yii migrate/create profile_fields

```

```
use yii\db\Schema;
use yii\db\Migration;
class m150317_155953_profile_fields extends Migration
{
    public function up()
    {
        $this->addColumn('{{%profile}}', 'lang', Schema::TYPE_STRING);
        // ... your fields
    }
    public function down()
    {
        $this->dropColumn('{{%profile}}', 'lang');
        // ... your fields
    }
}
```

### Two

[](#two-1)

Update model

```
namespace app\models;
use sersid\profile\models\Model;
class Profile extends Model
{
    const LANG_EN = 'en';
    const LANG_RU = 'ru';
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ['lang', 'default', 'value' => self::LANG_EN],
            ['lang', 'in', 'range' => [self::LANG_EN, self::LANG_RU]],
            // ... your rules
        ];
    }
}
```

### Three

[](#three-1)

```
$config = [
    ...
    'components' => [
        ...
        'profile' => [
            'class' => 'sersid\profile\components\Profile',
            'model' => 'app\models\Profile',
        ],
    ]
];
```

Uninstall
---------

[](#uninstall)

Applying migrations

```
yii migrate/down --migrationPath=@vendor/sersid/yii2-user-profile/migrations

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

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://avatars.githubusercontent.com/u/2066261?v=4)[Sersid](/maintainers/Sersid)[@Sersid](https://github.com/Sersid)

---

Top Contributors

[![Sersid](https://avatars.githubusercontent.com/u/2066261?v=4)](https://github.com/Sersid "Sersid (1 commits)")

### Embed Badge

![Health badge](/badges/sersid-yii2-user-profile/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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