ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Changing the 'realm'

August 08, 2012 5:24pm

Subscribe [2]
  • #1 / Aug 08, 2012 5:24pm

    AlteredState

    57 posts

    Hi

    I’m using HTTP authorisation on a template to restrice access, but the dialog box shows ‘ExpressionEngine Template’ as the realm.

    See attached screenshot of the dialog.

    Does anyone know of a way to either remove or change the ‘ExpressionEngine Template’ text to something more meaningful to the user, and less like an amateur coding glitch?

    Thanks in advance.

    Steve

  • #2 / Aug 09, 2012 11:57am

    Shane Eckert

    7174 posts

    Hello PositionOne,

    Thank you for posting your question here on the ExpressionEngine forums.

    Are you using an .htaccess file to create this?

    Is this code in the template? Can you show that code?

    Thank you,

  • #3 / Aug 15, 2012 5:28pm

    AlteredState

    57 posts

    No, this was created using EE’s own HTTP authentication option in the template access preferences.

  • #4 / Aug 16, 2012 4:29pm

    Kevin Smith

    4784 posts

    Hi Steve,

    Thanks for clearing that up. No, the label used for the realm cannot be changed from “ExpressionEngine Template”.

    Is there anything else we can help with?

  • #5 / Aug 17, 2012 8:56am

    AlteredState

    57 posts

    Thanks, but the relevant variable $realm is declared in Template.php.

    I’ve changed it anyway by adding a custom config item:

    $config['custom_realm'] = "Restricted Content";

    to system > expressionengine > config > config.php and then adding this code into the __construct function of

    system > expressionengine > libraries > Template.php

    if ($this->EE->config->item('custom_realm')!='')
      {
       $this->realm = $this->EE->config->item('custom_realm');
      }

    I think it would help if the realm could be amended to ‘Restricted Content’ in future releases.

    Steve

  • #6 / Aug 17, 2012 4:22pm

    Kevin Smith

    4784 posts

    Glad to see you found a solution that works for you, Steve. In general, I wouldn’t recommend making changes to the core since they’ll likely be broken on subsequent upgrades, but as long as you’re aware of the changes you’ve made, I’m glad this works for you.

    Thanks for the feedback! If there’s anything else we can do for you, just let us know!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases