line 380 .module:

if (isset($account->uid)) {

I thin this should read:

if ( (isset($account->uid)) && ($account->status==1) ) {

Comments

shafter’s picture

Assigned: Unassigned » shafter
Priority: Normal » Minor
Status: Active » Needs review

First of all, thanks for reporting!
This doesn't seem to be a major problem, as the user is properly validated before login, and the validation fails if the user is blocked. A proper error message is also displayed in this case.
Your solution might display module error messages instead of the default, drupal ones. but would do that a bit faster. We will look into it, if the modification is needed.

StephenRobinson’s picture

Hi,
Cheers for not being offended, just realised as $account->status is not set for anonymous user, this would throw a php warning, this may work better...

  if ( (isset($account->uid)) && (isset($account->status)) ) {
partyka’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)
Related issues: +#1493244: Prevent blocked users from logging in

This is a duplicate of https://www.drupal.org/node/1493244, marking as closed (duplicate)