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

CommentFileSizeAuthor
#3 3441965-3-MR7.diff981 byteskriboogh
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Mschudders created an issue. See original summary.

kriboogh’s picture

StatusFileSize
new981 bytes

Added patch of MR for use in composer.

wells made their first commit to this issue’s fork.

wells’s picture

Status: Needs review » Fixed

  • wells committed 1fcc7f5c on 3.x authored by Mschudders
    Issue #3441965 by Mschudders, kriboogh: Allow to get all accounts...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.