The current "Who's New" block is not completely accurate as it displays users who have signed up but have never logged in. A frequent reason for this is that the user intentionally/unintentionally supplied an incorrect e-mail addresses during signup etc. etc.

Simple patch attached.

Thanks
-K

CommentFileSizeAuthor
#3 whosnew.png6.46 KBZen
user.module_29.patch883 bytesZen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

I guess this is debatable. If you sign up, but are not logged on, you're online, not?

Zen’s picture

This is for the Who's *new* block as opposed to who's *online*, and addresses the case when someone signs up but hasn't _ever_ logged in. As soon as they log in even once, they will be eligible for the who's new block as the access field is set.

The basic issue is that failed/spam signups where erroneous/fake e-mails are used are listed as _new_ users, when they aren't, as they haven't completed the sign-up process i.e. they haven't logged in with their mailed password.

Hope that made sense :)

Thanks
-K

Zen’s picture

FileSize
6.46 KB

The attached screenshot is an example of a regular occurence of this issue.

-K

m3avrck’s picture

Status: Needs review » Reviewed & tested by the community

Zen, excellent catch! I agree 100%, many spam bots try to create accounts but because they never log in, those accounts just sit there and they *shouldn't* be considered "who's new" till they have at least logged in once succesfully, confirming their account. Patch looks great, RTC!

markus_petrux’s picture

+1

/me likes the idea too ;-)

Dries’s picture

If both blocks needs fixing, I guess we need a new patch?

m3avrck’s picture

Dries, I don't think the 'who's online' block is wrong, it was just the 'who's new' ... a user should be appear correctly in the 'who's online' because they'll have logged in by then.

Issue with 'who's new' is that anyone can create an account, but if you don't log in to that account, you should't appear in the 'who's new' box... maybe that acconut was created by a spambot or a fail attempt, but a user shouldn't be considered new until they log in.

Zen’s picture

For some context, this is the block of code affected - i.e. the "Who's new" block. "Who's online" doesn't come into the picture at all and is totally unrelated to this issue.

      case 2:
        if (user_access('access content')) {
          $result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 ORDER BY created DESC', 0, 5);
          while ($account = db_fetch_object($result)) {
            $items[] = $account;
          }
          $output = theme('user_list', $items);

          $block['subject'] = t('Who\'s new');
          $block['content'] = $output;
        }
        return $block;

Thanks for the speedy reviewing :)
-K

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks.

Zen’s picture

Status: Fixed » Closed (fixed)