select('users', 'u') ->condition('picture', '', '<>') ->fields('u', ['uid', 'access', 'picture']) ->orderBy('u.access'); return $query; } /** * {@inheritdoc} */ public function fields() { return [ 'uid' => 'Primary Key: Unique user ID.', 'access' => 'Timestamp for previous time user accessed the site.', 'picture' => "Path to the user's uploaded picture.", ]; } /** * {@inheritdoc} */ public function getIds() { $ids['uid']['type'] = 'integer'; return $ids; } }