This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » siteaccess and redirection

siteaccess and redirection

siteaccess and redirection

Monday 09 January 2012 3:41:19 pm - 2 replies

EZ publish new developer I would like to create a corporate portal with a party member and another party partner. I have two different siteaccess and I want that when the user logs in, he is redirected to either one or the other according to his user profile siteacess (usergroup). How do I do?
thank you in advance

Monday 09 January 2012 4:03:06 pm

Hi Aurelie,

I've never used this feature but I guess that you can use UserSettings.LoginRedirectionUriAttribute in site.ini to tell eZ Publish where you want to redirect a user depending on a content object attribute (in the User class or the User Group class).

Found this by looking at the user/login module view (line 144 in kernel/user/login.php

        $userUriAttrName  = '';
        $groupUriAttrName = '';
        $ini = eZINI::instance();
        if ( $ini->hasVariable( 'UserSettings', 'LoginRedirectionUriAttribute' ) )
            $uriAttrNames = $ini->variable( 'UserSettings', 'LoginRedirectionUriAttribute' );
            if ( is_array( $uriAttrNames ) )
                if ( isset( $uriAttrNames['user'] ) )
                    $userUriAttrName = $uriAttrNames['user'];
                if ( isset( $uriAttrNames['group'] ) )
                    $groupUriAttrName = $uriAttrNames['group'];



Tuesday 10 January 2012 3:12:35 pm

Thank you for your answer.

I still have a problem of access to my portal. When I connect, I headed redirect.tpl and I have to manually accept the redirection to access my intranet or extranet to me in my reporpose me sign.

I have 3 siteaccess Portal, intranet and extranet.
I coded
"LoginRedirectionUriAttribute [group] = redirection_uri" in [SiteSettings] of site.ini.append.php siteaccess portal and added path redirection in my classes usergroup members and partners.

If someone has already done a portal with two different access depending on the user group to which it belongs, I'm interested.

thank you


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from