Community

User Redirect After Login from Custom User Login Form

I have this custom module. In a template file for this custom module I have a registration form and a login form. To print out the user login form in my template, I'm using the following code...

<?php

   
if(!user_is_logged_in()) {
       
$elements = drupal_get_form("user_login");
       
$form = drupal_render($elements);
        print
$form;
    }
?>

Works fine, but when the user logs in they are redirected to their user page. This is true despite the Rule I have set up that redirects a user with a certain role. I tried LoginTobbagin. I tried Login_Redirect. Nothing works. So I can't tell what on earth is making that redirect supreme over everything else.

Any suggestions?

Comments

Not exactly what you are talking about but...

I was having a similar problem, maybe the solution offered here will give some options : http://drupal.org/node/1840090

nobody click here