Override entire user login / register page I am trying to figure out a way to override the entire /user page in D7.
There is a lot of articles out there that goes about altering the form, but I want to be able to rework the entire page (forms included) to get them into a nice bootstrap layout.

A lot of the information on the web is talking about page--user--login.tpl.php, but this does not work at all.

When using page--user.tpl.php, it seems to render my template file, but I cannot re-render the form.

When using

&lt;?php
  $form = drupal_get_form('user_login');
  print drupal_render($form);
?&gt;
My HTML goes here
&lt;?php
  // Render any remaining elements, such as hidden inputs (token, form_id, etc).
  print drupal_render_children($form);
?&gt;


I keep getting an infinite redirect loop. My best guess is because of a problem with the form_id that does not match.

Ps: I am using a bootstrap subtheme.

All information about this would be greatly appreciated.
In template.php, you could add an alter form to add classes, a wrapper, and I think also be able to add/edit fields in the form. Would that be of any help?

Example:

function THEME_NAME_form_user_login_alter(&amp;$form, &amp;$form_state) {
    $form['#attributes']['class'][] = 'custom-class';
}


in template.php would add the class custom-class around the login form, which you can then use to style the form.

As for using templates, I think they might have to be added in the correct location as well, e.g. I have recently built a site using custom templates with the user pages templates in /sites/all/theme-name/templates/user/. This also allows you to use custom markup. For example:

&lt;div class="custom-class--wrapper"&gt;
    &lt;?php print drupal_render_children($form) ?&gt;
&lt;/div&gt;


which is used in the file user-register-form.tpl.php.

Also, have you considered using panelizer to customise pages, that would be a lot easier than using template.php or custom templates. And if a change doesn't seem to take effect, you should try and clear the drupal cache.