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 ...@@ -409,13 +409,13 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
public function getRole() public function getRole()
{ {
$auth = AuthItem::find()->joinWith('assignment', true) // $auth = AuthItem::find()->joinWith('assignment', true)
->andWhere(['rule_name' => 'group']) // ->andWhere(['rule_name' => 'group'])
->andWhere(['auth_assignment.user_id' => $this->id]) // ->andWhere(['auth_assignment.user_id' => $this->id])
->one(); // ->one();
//
return $auth->name; // return $auth->name;
/*$assigment = AuthAssignment::find(['userid' => $this->id])->one(); $assigment = AuthAssignment::find(['userid' => $this->id])->one();
if (!$assigment) if (!$assigment)
{ {
$assigment = new AuthAssignment(); $assigment = new AuthAssignment();
...@@ -425,7 +425,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -425,7 +425,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
} }
return $assigment->role; return $assigment->role;
return 'admin';*/ return 'admin';
} }
public function getRoleName() 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