Closed (fixed)
Project:
Digest
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2020 at 20:53 UTC
Updated:
26 Nov 2020 at 22:44 UTC
Jump to comment: Most recent
The user autocomplete needs to be told not to list the anonymous user as you can can't send a digest to them :)
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,
],
];
Comments
Comment #3
derekcresswell commentedI'm not going to bother making a patch and such, it would be quite worthless in this case. Thank you for noticing this : )
Comment #4
derekcresswell commented