Allow to get all accounts instead of the "current account or passed account"

Created on 19 April 2024, 7 months ago
Updated 8 September 2024, 2 months ago

Problem/Motivation

Currently not possible to "easily" get all accounts.
Currently we have:

  public function getAccounts($plugin_id, $user_id = NULL) {
    $storage = $this->entityTypeManager->getStorage($this->entityType);

    if (!$user_id) {
      $user_id = $this->currentUser->id();
    }

    // Get the accounts associated to the user.
    $accounts = $storage->loadByProperties([
      'user_id' => $user_id,
      'plugin_id' => $plugin_id,
    ]);

    return $accounts;
  }

Only allows filtering on a certain ID (or the current one)

Steps to reproduce

/

Proposed resolution

Allow to get all.

Remaining tasks

Review merge request

✨ Feature request
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium Mschudders

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024