Skip to content

Commit 920debf

Browse files
authored
Merge pull request e282486518#8 from pangxieke/master
Updae AuthController.php
2 parents 89ae8c2 + 1001888 commit 920debf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backend/controllers/AuthController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ public function actionUser($role){
170170
$uids = Yii::$app->authManager->getUserIdsByRole($role);
171171
$uids = implode(',', array_unique($uids));
172172

173-
$_where = 'uid in('.$uids.')';
173+
/*更新uids 为空的情况*/
174+
if($uids){
175+
$_where = 'user_id in('.$uids.')';
176+
}else{
177+
$_where = '1 != 1';
178+
}
174179

175180
return $this->render('user',[
176181
'dataProvider' => $this->lists1(new Admin(), $_where),

0 commit comments

Comments
 (0)