Skip to content
Snippets Groups Projects
Commit dd7e5aca authored by saranya ashokkumar's avatar saranya ashokkumar
Browse files

Issue #3345562 by saranya ashokkumar: For Roles, email is not triggering

parent ecdb69f3
Branches 1.0.x
Tags 3.0.0-beta1 3.0.1-beta 4.0.1-beta
No related merge requests found
......@@ -295,16 +295,17 @@ function _workflow_notifications_collect_mail_ids($roles, $mail_ids) {
$user_storage = \Drupal::service('entity_type.manager')
->getStorage('user');
$ids = $user_storage->getQuery()
->condition('status', 1)
// $ids = $user_storage->getQuery()
// ->condition('status', 1)
// @todo ->condition('roles', $role, 'IN')
->execute();
$users = $user_storage->loadMultiple($ids);
// $users = \Drupal\user\Entity\User::loadMultiple($ids);
// ->execute();
if ($ids) {
$users = $user_storage->loadMultiple($ids);
// $users = \Drupal\user\Entity\User::loadMultiple($ids);
foreach ($users as $key => $user) {
$mail_ids[] = $user->getEmail();
foreach ($users as $key => $user) {
$mail_ids[] = $user->getEmail();
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment