If no username or password are given in the user login form, a 'The username has been blocked.' message is shown. In previous versions, the user would simply be returned to a fresh login form.

The attached patch solves this.

CommentFileSizeAuthor
user_login_user_blocked.patch423 byteskumo

Comments

Steve Dondley’s picture

Status: Needs review » Needs work

empty() is the wrong function to use. A value of "0" for the username will return false. I think the problem lies within the form validation module. I'm working on this bug now. See http://drupal.org/node/33812

killes@www.drop.org’s picture

This is still an issue.

markus_petrux’s picture

@steve: that issue has been closed. And the patch was related to checkboxes.

I agree with killes. This is still an issue. If you set the user/pass fields empty in the form, you get the following error messages:

  • The username has been blocked.
  • Username field is required.
  • Password field is required.

Which means $form_values['name'] is set (empty string).

Sorry, I reported the same thing here: http://drupal.org/node/45709 (now marked as dup)

I was also using !empty in my patch. I believe, though, that the same validation rule should be applied to the registration form. You can now register '0' as user name.

What about checking for ($form_values['name'] !== '') here ???

Jaza’s picture

Version: x.y.z » 4.7.x-dev
Status: Needs work » Closed (fixed)

Bug no longer exists in Drupal 5. Closing.