The function below is missing the "global $user" line, so that the if test always returns TRUE. I've corrected it below.

function noreqnewpass_og_links_alter(&$links, $group_node) {
  global $user;
  if (!$user->uid) {
    $dest = drupal_get_destination();
    unset($links['must_login']);
    $links['must_login'] = t('You must <a href="!login">login</a> in order to post into this group.', array('!login' => url("user/login", array('query' => $dest))));  
  }
}

Comments

rconstantine’s picture

Status: Active » Needs review
kreynen’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)