Forums / Setup & design / Customizing Login Sequence for Intranet Site

Customizing Login Sequence for Intranet Site

Author Message

ola adigun

Tuesday 12 December 2006 7:47:00 am

I'm using ezp for an intranet site which requires login to access site, but I need a welcome page that's different from the login form shown by default. The welcome page will then have a link to /user/login. Of course you wouldn't need to login before seeing the initial welcome page. What's the easiest way to accomplish this?

Ola

kracker (the)

Tuesday 12 December 2006 8:08:05 am

I would create a siteaccess for your internet site ('intranet_user'), I then use the setting, '<i>IndexPage</i> (from 'site.ini.append.php') to control what is displayed on url/uri ('/').

IndexPage=/content/view/full/2

This should allow you to set a welcome / index page.

cheers,
//kracker

<b>References</b>
<i>http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/sitesettings/indexpage
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/sitesettings</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

ola adigun

Tuesday 12 December 2006 8:19:44 am

Thanks for the quick response. I have something like that currently in place. However, I still get the login screen. It is only after logging in that I get the welcome page set by IndexPage. How can I bypass login requirement for this one page.

Thanks!
Ola

kracker (the)

Tuesday 12 December 2006 8:42:08 am

This seems as though you are getting an eZ publish access permissions error.

If this is true, I've seen this when the default siteaccess is not configured correctly.

Often when upgrading or moving eZ publish from one instance to another (os/hardware).

Make sure your siteaccess settings are correctly setting the variable, 'RequireUserLogin'.

Short of that I would check your user / role and permissions for anonymous role.

cheers,
//kracker

<b>References</b>
<i>http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings/requireuserlogin
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/siteaccesssettings</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

ola adigun

Friday 15 December 2006 8:06:14 am

RequireUserLogin is currently set to true.

It seems that there's no way to selectively bypass this check for welcome page even if anonymous user has full access to the node that contains the welcome page. I even created a simple module, added it to policyomit and gave anon user full rights to it. Access to the module still redirected me to the login screen. This doesn't sound right. I don't want to have to create a completely different siteaccess just for one welcome page.

Recap of what I'm trying to accomplish:
User accesses home page of intranet (the welcome page above), preferrably stored in ezp.
User clicks Login button on this page to access intranet
User sees login form, then logs in

thanks.
Ola

Claudia Kosny

Friday 15 December 2006 8:23:03 am

Hi

I see two options right now (although there are certainly more)
- Set requireuserlogin to false and deny the anonymous user access to everything, then grant content read access to the node with your welcome page
- Leave requireuserlogin on true, create a custom module that has only the welcome page as view, set this view as default page and make use of AnonymousAccessList[] to allow anonymous access to this view.

Not sure whether any of these will suit your needs, but maybe it gives you an idea.

Claudia

ola adigun

Friday 15 December 2006 1:41:51 pm

Claudia:

Option two is preferred and working great. Is there a way to override pagelayout for the custom module?

thanks!
Ola

Claudia Kosny

Saturday 16 December 2006 1:49:55 am

Hi Ola

You can override it for a specific view like this:

<?php
//php code for the view

$Result = array();
$Result['content'] = ...
$Result['path']     = ...
$Result['pagelayout'] = 'custom_pagelayout.tpl'; 
?>

Claudia