Inactive User checks to see if we sent a warning to a user that hasn't yet expired but the logic is backward.

CommentFileSizeAuthor
#1 block_user-1811210-1.patch823 bytesazinck

Comments

azinck’s picture

Status: Active » Needs review
StatusFileSize
new823 bytes

Patch attached.

thebruce’s picture

azinck is correct, the logic here needs his fix.

The query above this conditional which fills the $notexpired_user with a rowCount() is looking for warned users with a criteria of request being greater than the warned_user result. Warned user is created by adding the warned user interval, configured in the admin screen, to the request time when the cron job that warns the user is run. If the warned user interval has not yet been passed in time, then the user is still valid.

This particular conditional is meant to block users who have been sent a warning and that warning has expired.

The patch fixes and ensures that concern.

deekayen’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.