Skip to content

Commit 1f6e94f

Browse files
fixed bugs
1 parent e5d8f88 commit 1f6e94f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/models/User.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,10 @@ public function getName(){
395395
*/
396396
public static function getUsersByStatus($status_id)
397397
{
398-
return Yii::$app->cache->getOrSet('get_users_list'.$status_id, function () {
398+
return Yii::$app->cache->getOrSet('get_users_list'.$status_id, function () use ($status_id) {
399399
return ArrayHelper::map(
400400
self::find()
401-
->where(['in','status', self::GROUP_ALLOW_ADM])
401+
->where(['in','status', $status_id])
402402
->asArray()
403403
->all(), 'id', 'name');
404404
}, 3600);

0 commit comments

Comments
 (0)