contao/test — Issue #989: Better way to deal with multiple Membership groups redirect pages
Author: importer
Created: 2011-11-28 17:47:06+00:00
State: open
Labels: Feature, frontend

When a user belongs to multiple groups, only the first member group JumpTo is used to redirect to. As this list is not orderable, you cannot select which one takes priority.

I've setup the following:

Member belongs to 4 groups: Admin, Project1, Project2, Project3. Each member group default page redirects to a page in the site tree.

* Project Home (Admin Group default)
**** Project 1 Home (Project 1 group default)
**** Project 2 Home
**** Project 3 Home

If I make the member below to all the groups, it redirects to the Project 1, but I want the Admin users to redirect to the Project Home. Therefore I suggest that

* the membership group checkbox list be order-able (change to checkboxwizard)
* when reaching the ModuleLogin point where the group default is retrieved, it should iterate the query for the member group list, until a valid JumpTo page is setup in each member group

Then if I make my Membership groups list have the ADMIN group on the top, the Admin group takes precedence and the Admin user is redirected to Project HOME. If there is no default set-up for the ADMIN group, it would check the next one down on the membership group list, e.g. Project 1 and redirect to that default page instead.

This would require a code change to the ModuleLogin.php:

instead of:

```
if ($objGroupPage->numRows && $objGroupPage->jumpTo)
```

change this to:

```
while ($objGroupPage->next())
{
if ($objGroupPage->jumpTo)
{
... check page is valid and set-up redirect and exit while loop...
}
}
```

--- _Originally created by thyon on September 5th, 2009, at 12:14pm (ID 989)_