Commit 6b4d4a3b authored by Shakarim Sapa's avatar Shakarim Sapa

- FIX

parent 1ca13e52
......@@ -409,13 +409,13 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
public function getRole()
{
$auth = AuthItem::find()->joinWith('assignment', true)
->andWhere(['rule_name' => 'group'])
->andWhere(['auth_assignment.user_id' => $this->id])
->one();
return $auth->name;
/*$assigment = AuthAssignment::find(['userid' => $this->id])->one();
// $auth = AuthItem::find()->joinWith('assignment', true)
// ->andWhere(['rule_name' => 'group'])
// ->andWhere(['auth_assignment.user_id' => $this->id])
// ->one();
//
// return $auth->name;
$assigment = AuthAssignment::find(['userid' => $this->id])->one();
if (!$assigment)
{
$assigment = new AuthAssignment();
......@@ -425,7 +425,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
}
return $assigment->role;
return 'admin';*/
return 'admin';
}
public function getRoleName()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment