"No active batch" error after cancelling account with who's online block enabled

David Poblador - January 4, 2003 - 19:39
Project:Drupal
Version:7.x-dev
Component:user.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

When a user is deleted after being online, its entry in "users online" block remains blank until the online expiry time is reached.

#1

Anonymous - March 9, 2003 - 16:33
Version:<none>»

#2

moshe weitzman - June 10, 2003 - 23:30
Title:Blank entry in "users online"» Blank entry in
Priority:normal» minor

Once we add a hook at during user_delete(), it will be easy for stats module to delete all logs related to the deleted user.

priority => minor

#3

Kjartan - November 1, 2003 - 21:11
Title:Blank entry in» Deleted users show in who is online block
Category:bug report» feature request

#4

Jose Reyero - December 30, 2005 - 15:49

I think its ok -but not that important- not to show that user on the block.

But deleting logs is a bad policiy.

As a site admin, I want to be able to see what's happened, even if the user who did something has been deleted from the system, the logs may be important.

#5

LAsan - March 27, 2008 - 12:51
Version:» 7.x-dev

#6

dereine - January 24, 2009 - 18:10
Status:active» postponed (maintainer needs more info)

i think this is solved .

<?php
          $items
= db_query_range('SELECT u.uid, u.name, MAX(s.timestamp) AS max_timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= :interval AND s.uid > 0 GROUP BY u.uid, u.name ORDER BY max_timestamp DESC', array(':interval' => $interval), 0, $max_users)->fetchAll();
         
$output .= theme('user_list', $items, t('Online users'));
?>

This looks in the sessions table after logged in users.

and this sessions are removed, when blocking/canceling/delete users so i guess its not a issue any more

#7

lut4rp - February 1, 2009 - 08:51

Tried this out on an updated HEAD a while ago. I am able to easily cancel the account (w00t) and the "Who's Online" block does not show the deleted account.

But, after I visit the link to confirm cancellation, and once the account is canceled successfully, I get a one-time error - "No active batch". This error goes away on a page refresh. Why is that?

AttachmentSizeStatusTest resultOperations
no-active-batch.jpg127.41 KBIgnoredNoneNone

#8

dereine - February 1, 2009 - 10:34

i think this is a caching issue because the content of the block is cached

The block has BLOCK_CACE_PER_ROLE.

Did you tryed to clear the cache once.?

#9

lut4rp - February 1, 2009 - 12:40

As discussed on IRC with dereine, this hasn't got anything to do with block caching since the block is working fine. Its *after* the user has successfully canceled his account that the error message appears.

#10

Dave Reid - April 20, 2009 - 18:48
Component:statistics.module» user.module

The who's online block is actually in the user.module and has nothing to do with statistics.module.

#11

sun.core - July 8, 2009 - 23:42
Title:Deleted users show in who is online block» "No active batch" error after cancelling account with who's online block enabled
Category:feature request» bug report
Priority:minor» normal
Status:postponed (maintainer needs more info)» active

Proper title and status.

 
 

Drupal is a registered trademark of Dries Buytaert.