Load a user object via login form name field 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']-&gt;name);


Thank you for your time.
For user_load function in D6 you have to use pass the $user_info array like ,

 $account = user_load(array('name' =&gt; $form_state['values']-&gt;name))