You are here

function ldapgroups_user_test_submit in LDAP integration 6

Submit handler for testing user against the ldapgroups settings.

_state

Parameters

Array $form:

File

./ldapgroups.admin.inc, line 455
Module admin page callbacks.

Code

function ldapgroups_user_test_submit($form, &$form_state) {
  if (isset($form_state['values']['account'])) {
    $account = $form_state['values']['account'];
    $dn = $account->ldap_dn;
    $sid = $account->ldap_config;
  }
  else {
    $account = NULL;
    $dn = $form_state['values']['dn'];
    $sid = $form_state['values']['server'];
  }
  $form_state['storage']['results'] = ldapgroups_user_test_output($account, $sid, $dn);
}