In my module tpl file I'm calling
<?php print drupal_render(drupal_get_form('mymodule_login_form')); ?>
Then in my .module file I have this function:
function mymodule_login_form($form, &$form_state){
$form = drupal_get_form('user_login');
return $form;
}
So the user_login form gets called and shows up but when I try to use it ( submit it ) I'm always getting the error message: 'The username has not been activated or is blocked.'
When I change the tpl file to:
<?php print drupal_render(drupal_get_form('user_login')); ?>
it works and giving the correct error messages or logs the user in.
The problem with this is that I'm using it in a popup screen and want to display the error messages in the popup screen using ajax. So I need to alter the user_login form. I know how to do that but I'm not getting past the error message 'The username has not been activated or is blocked.'