Created
November 20, 2013 10:15
-
-
Save danreb/7560816 to your computer and use it in GitHub Desktop.
Customizing Drupal 7 Login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function THEMENAME_theme() { | |
$items = array(); | |
// create custom user-login.tpl.php | |
$items['user_login'] = array( | |
'render element' => 'form', | |
'path' => drupal_get_path('theme', 'THEMENAME') . '/template', | |
'template' => 'user-login', | |
'preprocess functions' => array( | |
'THEMENAME_preprocess_user_login' | |
), | |
); | |
return $items; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
print drupal_render($form['name']); | |
print drupal_render($form['pass']); | |
print drupal_render($form['form_build_id']); | |
print drupal_render($form['form_id']); | |
?> | |
<!-- Print create account and password reset links --> | |
<div class="custom-login-links"> | |
<a href="/user/register" title="Create an account">Sign up</a> | | |
<a href="/user/password" title="Reset your password">Forgot your password?</a> | |
</div> | |
<?php print drupal_render($form['actions']); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment