Problem/Motivation

The user autocomplete needs to be told not to list the anonymous user as you can can't send a digest to them :)

Steps to reproduce

Proposed resolution

Change

    $form['send_to_user'] = [
      '#type' => 'entity_autocomplete',
      '#target_type' => 'user',
      '#title' => $this->t('Send to user'),
      '#description' => $this->t('The digest will be sent out to this user.'),
      '#default_value' => $user_storage->load($this->currentUser->id()),
    ];

to

    $form['send_to_user'] = [
      '#type' => 'entity_autocomplete',
      '#target_type' => 'user',
      '#title' => $this->t('Send to user'),
      '#description' => $this->t('The digest will be sent out to this user.'),
      '#default_value' => $user_storage->load($this->currentUser->id()),
      '#selection_settings' => [
        'include_anonymous' => FALSE,
      ],
    ];

Remaining tasks

User interface changes

API changes

Data model changes

Comments

alexpott created an issue. See original summary.

  • DerekCresswell committed 689f878 on 1.0.x
    Issue #3182258 by DerekCresswell, alexpott: Test digest user selector...
derekcresswell’s picture

Status: Active » Fixed

I'm not going to bother making a patch and such, it would be quite worthless in this case. Thank you for noticing this : )

derekcresswell’s picture

Status: Fixed » Closed (fixed)

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