rhosocial/yii2-user

Common user model, including identity and profile.

Installs: 538

Dependents: 6

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2022-09-04 13:49 UTC

This package is auto-updated.

Last update: 2024-04-04 17:19:34 UTC


README

Common User & Profile Models for Yii 2.

Latest Stable Version License Code Coverage Scrutinizer Quality Score

Introduction

This package consists of two models:

  • User: GUID, ID, Password Hash, IP Address, Timestamp, Password Refresh Token, Auth Key, Source, Status.
  • Profile: GUID (corresponding with GUID), Nickname, Timestamp.

Installation

The preferred way to install this extension is through composer

Either run

php composer.phar require rhosocial/yii2-user:dev-master

or add

"rhosocial/yii2-user": "dev-master"

to the require section of your composer.json

Basic Usage

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

class User extends \rhosocial\user\models\User
{
    ...
}

and

class Profile extends \rhosocial\user\models\Profile
{
    ...
}

But the above Profile class does not contain email and phone attributes. The following SimpleProfile contains them (including corresponding rules):

class Profile extends \rhosocial\user\models\SimpleProfile
{
    ...
}

further detailed usage seen in here.