Remove descriptions from user login form

Public

Removes username and password descriptions.

Get raw version
php
  1. /**
  2.  * Implements hook_form_alter().
  3.  */
  4. function hook_form_alter(&$form, &$form_state, $form_id) {
  5.  
  6. if ($form_id == 'user_login') {
  7.  
  8. $form['name']['#description'] = '';
  9. $form['pass']['#description'] = '';
  10.  
  11. }
  12.  
  13. }