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
[solved] Groups within FEU and customContent, and secure pages
[solved] Groups within FEU and customContent, and secure pages
Last edited by lampsie on Thu Jul 23, 2009 7:47 am, edited 1 time in total.
Re: Groups within FEU and customContent, and secure pages
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:
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):
(adapted from here: http://wiki.cmsmadesimple.org/index.php ... direct_UDT)
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>';
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.' -->';
Re: Groups within FEU and customContent, and secure pages
Hi,
Maybe you can do that with one, or both, of these UDT ?
- http://forum.cmsmadesimple.org/index.php?topic=33309.0
- http://forum.cmsmadesimple.org/index.ph ... 87204.html
Maybe you can do that with one, or both, of these UDT ?
- http://forum.cmsmadesimple.org/index.php?topic=33309.0
- http://forum.cmsmadesimple.org/index.ph ... 87204.html
The universe of information technology is constantly growing and contains only emerging products built on successive patches
Re: Groups within FEU and customContent, and secure pages
this is a default feature of FEU. Check the Preferences tab. You can redirect based on username or usergroup
Re: Groups within FEU and customContent, and secure pages
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
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