How to remove 'Register' link from developer portal

Not applicable

You can prevent self-registration via the administrative console, but the link and modal form still show up, but then it gives an authorization denied message. Can the 'Register' link be removed?

0 6 541
6 REPLIES 6

@Daniel Greene

It's a bug, I can able to reproduce same. You can fix it in your custom theme for time being. Please find solution below.

  • Edit page.tpl.php in your custom theme & update code to add access validation.
  • If you have not overriden page.tpl.php file in your custom theme, you can create folder called "templates" in your apigee_responsive sub theme & copy page.tpl.php file from "profiles/apigee/themes/apigee_responsive/templates/pages/" folder to your custom theme templates folder

See code below which cause issue in page.tpl.php

            <?php if (user_is_anonymous()) { ?>
              <li class="<?php echo (($current_path == "user/register") ? "active":""); ?>"><?php echo l(t("Register"), "user/register"); ?></li>
              <li class="<?php echo (($current_path == "user/login") ? "active":""); ?>"><?php echo l(t("Login"), "user/login"); ?></li>
            <?php } else {

See code that fixes issue below,

            <?php if (user_is_anonymous()) { ?>
              <?php if (drupal_valid_path('user/register')) { ?>
                <li class="<?php echo (($current_path == "user/register") ? "active":""); ?>"><?php echo l(t("Register"), "user/register"); ?></li>
              <?php } ?>
              <li class="<?php echo (($current_path == "user/login") ? "active":""); ?>"><?php echo l(t("Login"), "user/login"); ?></li>
            <?php } else {

Note :

You can able to do above change only if you have access to code base of Developer Portal.

I will let our team know about this issue so that fix will be available in next release. Thank you for highlighting same. We will keep you updated.

@Anil Sagar Any update on this fix yet? We are still seeing the similar behavior?

@Anil Sagar

This was flagged as a bug about 1 year ago. as far as you know, has it been fixed now? (Do you have the jira ticket number?)

Unfortunately, I don't remember JIRA ticket @Dino , I might have also missed to create one 😞