Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to check if a user account has been disabled for LDAP before the user completes the login process using a custom form validator.

What has me stuck is how I would use user_load to load the user object of the person logging in via the login form. I'm not sure how I would structure the form array within the user_load function.

What I currently have is:

$account = user_load($form_state['values']->name);

Thank you for your time.

share|improve this question
up vote 0 down vote accepted

For user_load function in D6 you have to use pass the $user_info array like ,

 $account = user_load(array('name' => $form_state['values']->name))
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.