You are here

function cas_login_block in CAS 7

Same name and namespace in other branches
  1. 6.3 cas.module \cas_login_block()

Login form for the CAS login block.

1 string reference to 'cas_login_block'
cas_block_view in ./cas.module
Implements hook_block_view().

File

./cas.module, line 777
Enables users to authenticate via a Central Authentication Service (CAS) Cas will currently work if the auto registration is turned on and will create user accounts automatically.

Code

function cas_login_block($form) {
  $form['#action'] = url('cas', array(
    'query' => drupal_get_destination(),
  ));
  $form['#id'] = 'cas-login-form';
  $form['cas_login_redirection_message'] = array(
    '#type' => 'item',
    '#markup' => t(variable_get('cas_login_redir_message', CAS_LOGIN_REDIR_MESSAGE)),
    '#weight' => -1,
  );
  $form['actions'] = array(
    '#type' => 'actions',
  );
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t(variable_get('cas_login_invite', CAS_LOGIN_INVITE_DEFAULT)),
  );
  return $form;
}