Index: drupalvb.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drupalvb/drupalvb.module,v retrieving revision 1.34 diff -u -p -r1.34 drupalvb.module --- drupalvb.module 1 Feb 2009 02:00:25 -0000 1.34 +++ drupalvb.module 29 Jul 2009 18:27:04 -0000 @@ -472,11 +472,12 @@ function drupalvb_user_delete($account) function drupalvb_login() { global $user; - if ($_REQUEST['name']) { + if ($_POST['name']) { + $form_state = array('values' => $_POST); if ($user->uid) { // If the user is already logged in to Drupal, we ensure the same for // vBulletin. - if (drupalvb_auth($_REQUEST['name'], trim($_REQUEST['pass']))) { + if (drupalvb_login_validate(array(), $form_state)) { drupal_goto(!empty($_REQUEST['destination']) ? $_REQUEST['destination'] : 'user/'. $user->uid); } else { @@ -488,9 +489,12 @@ function drupalvb_login() { } else { // Otherwise perform the full login procedure. - user_login_validate($_REQUEST['form_id'], $_REQUEST); + foreach (user_login_default_validators() as $validator) { + $validator(array(), $form_state); + } if (!form_get_errors()) { - $redirect = user_login_submit($_REQUEST['form_id'], $_REQUEST); + user_login_submit(array(), $form_state); + $redirect = (isset($form_state['redirect']) ? $form_state['redirect'] : ''); drupal_goto(!empty($_REQUEST['destination']) ? $_REQUEST['destination'] : $redirect); } else { @@ -1027,7 +1031,7 @@ function drupalvb_lookup_drupal_user($us // Register this user in Drupal using a temporary password, since we don't // know the real one. It will be updated when the user logs in to Drupal // for the first time using its vBulletin credentials. - // @see drupalvb_auth() + // @see drupalvb_login_validate() $userinfo = array( 'name' => $vbuser['username'], 'pass' => user_password(),