user_login_block

5 user.module user_login_block()
6 user.module user_login_block()
7 user.module user_login_block($form)
8 user.module user_login_block($form)

1 string reference to 'user_login_block'

File

modules/user/user.module, line 1288
Enables the user registration and login system.

Code

function user_login_block($form) {
  $form['#action'] = url(current_path(), array('query' => drupal_get_destination(), 'external' => FALSE));
  $form['#id'] = 'user-login-form';
  $form['#validate'] = user_login_default_validators();
  $form['#submit'][] = 'user_login_submit';
  $form['name'] = array(
    '#type' => 'textfield', 
    '#title' => t('Username'), 
    '#maxlength' => USERNAME_MAX_LENGTH, 
    '#size' => 15, 
    '#required' => TRUE,
  );
  $form['pass'] = array(
    '#type' => 'password', 
    '#title' => t('Password'), 
    '#maxlength' => 60, 
    '#size' => 15, 
    '#required' => TRUE,
  );
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit', 
    '#value' => t('Log in'),
  );
  $items = array();
  if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
    $items[] = l(t('Create new account'), 'user/register', array('attributes' => array('title' => t('Create a new user account.'))));
  }
  $items[] = l(t('Request new password'), 'user/password', array('attributes' => array('title' => t('Request new password via e-mail.'))));
  $form['links'] = array('#markup' => theme('item_list', array('items' => $items)));
  return $form;
}

Comments

Array

I am using Drupal 7 with pixture reloaded theme.

The block user login shows on the dscription line the word "Array".

how can I fix that? I did not change anything on the user.module or page.tpl.php or template.tpl.php.

The only change i made it is install the automatic log out module, but at first every was OK.

Best regards

Arellani

Login or register to post comments