original_string: public static function lastActive()
      {
          $last = Podium::getInstance()->podiumCache->get('forum.lastactive');
          if ($last === false) {
              $time = time() - 15 * 60;
              $last = [
                  'count' => static::find()->where(['>', 'updated_at', $time])->count(),
                  'members' => static::find()->where(['and',
                          ['>', 'updated_at', $time],
                          ['is not', 'user_id', null],
                          ['anonymous' => 0]
                      ])->count(),
                  'anonymous' => static::find()->where(['and',
                          ['>', 'updated_at', $time],
                          ['is not', 'user_id', null],
                          ['anonymous' => 1]
                      ])->count(),
                  'guests' => static::find()->where(['and',
                          ['>', 'updated_at', $time],
                          ['user_id' => null]
                      ])->count(),
                  'names' => [],
              ];
              $members = static::find()->where(['and',
                      ['>', 'updated_at', $time],
                      ['is not', 'user_id', null],
                      ['anonymous' => 0]
                  ]);
              foreach ($members->each() as $member) {
                  $last['names'][$member->user_id] = [
                      'name' => $member->username,
                      'role' => $member->user_role,
                      'slug' => $member->user_slug,
                  ];
              }
              Podium::getInstance()->podiumCache->set('forum.lastactive', $last, 60);
          }
          return $last;
      }
code: public static function lastActive()
      {
          $last = Podium::getInstance()->podiumCache->get('forum.lastactive');
          if ($last === false) {
              $time = time() - 15 * 60;
              $last = [
                  'count' => static::find()->where(['>', 'updated_at', $time])->count(),
                  'members' => static::find()->where(['and',
                          ['>', 'updated_at', $time],
                          ['is not', 'user_id', null],
                          ['anonymous' => 0]
                      ])->count(),
                  'anonymous' => static::find()->where(['and',
                          ['>', 'updated_at', $time],
                          ['is not', 'user_id', null],
                          ['anonymous' => 1]
                      ])->count(),
                  'guests' => static::find()->where(['and',
                          ['>', 'updated_at', $time],
                          ['user_id' => null]
                      ])->count(),
                  'names' => [],
              ];
              $members = static::find()->where(['and',
                      ['>', 'updated_at', $time],
                      ['is not', 'user_id', null],
                      ['anonymous' => 0]
                  ]);
              foreach ($members->each() as $member) {
                  $last['names'][$member->user_id] = [
                      'name' => $member->username,
                      'role' => $member->user_role,
                      'slug' => $member->user_slug,
                  ];
              }
              Podium::getInstance()->podiumCache->set('forum.lastactive', $last, 60);
          }
          return $last;
      }
code_tokens: public static function lastActive ( ) { $ last = Podium :: getInstance ( ) -> podiumCache -> get ( 'forum.lastactive' ) ; if ( $ last === false ) { $ time = time ( ) - 15 * 60 ; $ last = [ 'count' => static :: find ( ) -> where ( [ '>' , 'updated_at' , $ time ] ) -> count ( ) , 'members' => static :: find ( ) -> where ( [ 'and' , [ '>' , 'updated_at' , $ time ] , [ 'is not' , 'user_id' , null ] , [ 'anonymous' => 0 ] ] ) -> count ( ) , 'anonymous' => static :: find ( ) -> where ( [ 'and' , [ '>' , 'updated_at' , $ time ] , [ 'is not' , 'user_id' , null ] , [ 'anonymous' => 1 ] ] ) -> count ( ) , 'guests' => static :: find ( ) -> where ( [ 'and' , [ '>' , 'updated_at' , $ time ] , [ 'user_id' => null ] ] ) -> count ( ) , 'names' => [ ] , ] ; $ members = static :: find ( ) -> where ( [ 'and' , [ '>' , 'updated_at' , $ time ] , [ 'is not' , 'user_id' , null ] , [ 'anonymous' => 0 ] ] ) ; foreach ( $ members -> each ( ) as $ member ) { $ last [ 'names' ] [ $ member -> user_id ] = [ 'name' => $ member -> username , 'role' => $ member -> user_role , 'slug' => $ member -> user_slug , ] ; } Podium :: getInstance ( ) -> podiumCache -> set ( 'forum.lastactive' , $ last , 60 ) ; } return $ last ; }
docstring: Updates tracking.
  @return array
docstring_tokens: Updates tracking .