diff --git a/modules/ccmnet/ccmnet.module b/modules/ccmnet/ccmnet.module index a6d45b31..aa0a15b9 100644 --- a/modules/ccmnet/ccmnet.module +++ b/modules/ccmnet/ccmnet.module @@ -134,13 +134,13 @@ function ccmnet_entity_field_access($operation, \Drupal\Core\Field\FieldDefiniti $allowed_roles = ['administrator', 'ccmnet_pm', 'champions_mentorship_admin']; $user_roles = $account->getRoles(); $has_access = !empty(array_intersect($allowed_roles, $user_roles)); - + if (!$has_access) { return \Drupal\Core\Access\AccessResult::forbidden()->addCacheContexts(['user.roles']); } } } - + return \Drupal\Core\Access\AccessResult::neutral(); } @@ -921,7 +921,7 @@ function ccmnet_cron() { $author = $node->getOwner()->getEmail(); $options = ['absolute' => FALSE]; $here = Url::fromRoute('entity.node.canonical', ['node' => $interested_nid], $options); - $link = 'https://ccmnet.org' . $here->toString(TRUE)->getGeneratedUrl(); + $link = $here->toString(TRUE)->getGeneratedUrl(); $node_title = $node->getTitle(); $mentorship_program = $node->get('field_mentorship_program')->getString(); if ($mentorship_program == 910) {