Skip to main content
I did not understand the question.
Source Link
15dk51
  • 1k
  • 8
  • 15

If you dont need the link to "Create new account" and "Request new Password" , you can remove the following html form theIn your theme's template.

<div class='links'> <a href='/user/register'>Create an Account</a> | <a href='/user/password'>Forgot Password</a> </div> 

You block will look as followsphp file:

<div id='user-login-block-container'>/** * <divImplements id='user-login-block-form-fields'>hook_form_FORM_ID_alter().   <?php print $name; /*/ Display username field ?>  <?php print $pass; // Display Password field ?>  <?php print $submit; // Display submitfunction buttonYOURTHEMENAME_form_user_login_block_alter(&$form) ?>{  <?php print $rendered; //   Display hidden elements unset(required for successful login$form['links']);  ?>    </div>return; </div> } 

In this function you have access to the form as an array. Usually I enable devel module and do a dsm($form) . In your case dsm() will not work because you need to be logged in to be able to see the output. I used var_dump($form) to see the form and used unset() function to remove the links.

If you dont need the link to "Create new account" and "Request new Password" , you can remove the following html form the template.

<div class='links'> <a href='/user/register'>Create an Account</a> | <a href='/user/password'>Forgot Password</a> </div> 

You block will look as follows:

<div id='user-login-block-container'> <div id='user-login-block-form-fields'>   <?php print $name; // Display username field ?>  <?php print $pass; // Display Password field ?>  <?php print $submit; // Display submit button ?>  <?php print $rendered; // Display hidden elements (required for successful login) ?>    </div> </div> 

In your theme's template.php file:

/** * Implements hook_form_FORM_ID_alter(). */ function YOURTHEMENAME_form_user_login_block_alter(&$form) {    unset($form['links']);  return;  } 

In this function you have access to the form as an array. Usually I enable devel module and do a dsm($form) . In your case dsm() will not work because you need to be logged in to be able to see the output. I used var_dump($form) to see the form and used unset() function to remove the links.

Source Link
15dk51
  • 1k
  • 8
  • 15

If you dont need the link to "Create new account" and "Request new Password" , you can remove the following html form the template.

<div class='links'> <a href='/user/register'>Create an Account</a> | <a href='/user/password'>Forgot Password</a> </div> 

You block will look as follows:

<div id='user-login-block-container'> <div id='user-login-block-form-fields'> <?php print $name; // Display username field ?> <?php print $pass; // Display Password field ?> <?php print $submit; // Display submit button ?> <?php print $rendered; // Display hidden elements (required for successful login) ?> </div> </div>