[solved] Groups within FEU and customContent, and secure pages

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
lampsie
Forum Members
Forum Members
Posts: 38
Joined: Fri Nov 17, 2006 9:25 am

[solved] Groups within FEU and customContent, and secure pages

Post by lampsie »

Hi,

I'm trying to see if there is a nice streamlined way to do this:

In FEU I have set up a number of 'groups'...what I want to acheive is that when a user logs in, the login box will check which group the user belongs to, and then redirect them to a particular page on the site.

Is this possible to do?

Thanks,
lamps
Last edited by lampsie on Thu Jul 23, 2009 7:47 am, edited 1 time in total.
NaN

Re: Groups within FEU and customContent, and secure pages

Post by NaN »

With an UDT and the eventmanager it should be possible.
Since i don't know what parameters the FEU Module is passing to the eventmanager if a user logs in (maybe Calguy can tell you) i would do a test first.
Try this:

Create a UDT called "test".
Insert this Code:

Code: Select all

echo '<pre>';
print_r($params);
echo '</pre>';
Subscribe this UDT to the FEU login event ("Extensions->Eventmanager").
Login to your frontend and view the result.
There might be something like Array( index => value ).

If there is the groupid or groupname you can try this UDT (example - it won't work yet):

Code: Select all


    global $gCms;
    $manager =& $gCms->GetHierarchyManager();

    $page_alias = "home";

    switch($params['group']) {

        case "Group A": $page_alias = "group_a";
        case "Group B": $page_alias = "group_b";
        case "Group C": $page_alias = "group_c";
        ...
    }

    $node =& $manager->sureGetNodeByAlias($page_alias);
    $content =& $node->GetContent();
    if (isset($content) && is_object($content))
       {
         if ($content->GetURL() != '')
         {
            redirect($content->GetURL());
         }
       }
    else return '<!-- redirect udt - page not found: '.$page_alias.' -->';

(adapted from here: http://wiki.cmsmadesimple.org/index.php ... direct_UDT)
User avatar
seensite
Forum Members
Forum Members
Posts: 173
Joined: Sun Feb 10, 2008 7:36 pm

Re: Groups within FEU and customContent, and secure pages

Post by seensite »

The universe of information technology is constantly growing and contains only emerging products built on successive patches
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Groups within FEU and customContent, and secure pages

Post by jmcgin51 »

this is a default feature of FEU.  Check the Preferences tab.  You can redirect based on username or usergroup
lampsie
Forum Members
Forum Members
Posts: 38
Joined: Fri Nov 17, 2006 9:25 am

Re: Groups within FEU and customContent, and secure pages

Post by lampsie »

Hi all,

Thank you all for the replies, each useful in their own way for other stuff I'm doing too! As I go into preferences, I can see now where to do this (enter "{group}" into the login redirect)...as it happens, all my users are only in one group, so this works well for me :)

Thanks,
Lamps
Post Reply

Return to “Modules/Add-Ons”