Builds and returns the renderable array for this block plugin.
array A renderable array representing the content of the block.
Overrides BlockPluginInterface::build
\Drupal\block\BlockRenderController
public function build() {
// Retrieve a list of new users who have accessed the site successfully.
$items = db_query_range('SELECT uid, name FROM {users} WHERE status <> 0 AND access <> 0 ORDER BY created DESC', 0, $this->configuration['whois_new_count'])
->fetchAll();
$build = array(
'#theme' => 'item_list__user__new',
'#items' => array(),
);
foreach ($items as $account) {
$build['#items'][] = theme('username', array(
'account' => $account,
));
}
return $build;
}