for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace yii2mod\rbac\tests\data;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;
/**
* @property int $id
* @property string $username
* @property string $email
*/
class User extends ActiveRecord implements IdentityInterface
{
* @inheritdoc
public static function tableName()
return 'user';
}
public function rules()
return [
[['username', 'email'], 'required'],
];
public static function findIdentity($id)
return static::findOne($id);
public static function findIdentityByAccessToken($token, $type = null)
// TODO: Implement findIdentityByAccessToken() method.
public function getId()
return $this->getPrimaryKey();
public function getAuthKey()
// TODO: Implement getAuthKey() method.
public function validateAuthKey($authKey)
// TODO: Implement validateAuthKey() method.