We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5d8f88 commit 1f6e94fCopy full SHA for 1f6e94f
src/models/User.php
@@ -395,10 +395,10 @@ public function getName(){
395
*/
396
public static function getUsersByStatus($status_id)
397
{
398
- return Yii::$app->cache->getOrSet('get_users_list'.$status_id, function () {
+ return Yii::$app->cache->getOrSet('get_users_list'.$status_id, function () use ($status_id) {
399
return ArrayHelper::map(
400
self::find()
401
- ->where(['in','status', self::GROUP_ALLOW_ADM])
+ ->where(['in','status', $status_id])
402
->asArray()
403
->all(), 'id', 'name');
404
}, 3600);
0 commit comments