Redirecting after login based on user group I'd like to control where a user gets re-directed after login based on the user group. That is, userGroupA logs in and is sent to /templateA/_entry, while userGroupB logs in and is sent to /templateB/_entry. 

I understand that postLoginRedirect can be used dynamically. Are there any examples of this?

Thanks!
To set the setting dynamically, you’ll need to create a new plugin, which just has an init() method with this:

public function init()
{
    // Is this a login request?
    if (
        craft()-&gt;request-&gt;getActionSegments() === array('users', 'login') &amp;&amp;
        ($loginName = craft()-&gt;request-&gt;getPost('loginName')) !== null &amp;&amp;
        ($user = craft()-&gt;users-&gt;getUserByUsernameOrEmail($loginName)) !== null
    )
    {
        if ($user-&gt;isInGroup('userGroupA'))
        {
            craft()-&gt;config-&gt;set('postLoginRedirect', 'path/a');
        }
        else if ($user-&gt;isInGroup('userGroupB'))
        {
            craft()-&gt;config-&gt;set('postLoginRedirect', 'path/b');
        }
    }
}


If none of the conditions match, then Craft will stick with whatever’s in your craft/config/general.php file.