Needs review
Project:
Account reminder
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Aug 2009 at 05:32 UTC
Updated:
7 Jan 2012 at 03:25 UTC
Jump to comment: Most recent file
I just installed Account Reminder and tested on my drupal sites. After I enabled the module and run the crone, the users that are not validated are shown as active users. I think the account should remain inactive until the user activates his/her account. Please advise if I am wrong.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | account_reminder-6.x-1.2-549846.patch | 562 bytes | JimBroad |
| #9 | account_reminder-549846.patch | 817 bytes | JimBroad |
Comments
Comment #1
jaydub commentedWhat pages are you looking at that show you that the users are active users? Or are you viewing the users table directly and if so which field are you looking at?
Comment #2
sarmiluv commentedI am looking at Who's New block. After running the crone, inactive users that were not shown in the block prior to running the crone are shown in the block after running the crone. When I go to the users account, it shows the user as active.
Comment #3
jaydub commentedDid you by chance run cron manually as the admin user or a user with administer users permission?
I ask because the core User module will write the current time to the access column of the {users} table when user_save() is run if the user_access('administer users') is TRUE when user_save() is called. If you let Account Reminder do its thing via cron then you should not have this problem with the access field getting written to.
For reference look in user_save() around line 215 or so:
Comment #4
ilo commentedMmm.. Correct me if I'm asking a stupid question, but why should users be modified on a cron run?
Comment #5
izmeez commentedsubscribing
Comment #6
j0k3z commentedThis is driving me nuts.
I had hundreds of users who signed up but never activated their accounts, so I wanted a way to remind them via email and then delete them if after a few days they didnt signup still.
But after running cron a few times (for another reason) all of these users were marked as active and given 'last active' times even though they NEVER verified their accounts. So now I cant tell which 300+ users I need to delete.
Seems like a bug if this module doesnt work properly if cron is run as admin - cron is run as admin quite often on lots of my websites.
Comment #7
bryancasler commentedsubscribe
Comment #8
jaydub commentedagain, the problem is with Drupal core user_save(). It's there that the decision to update the users last access time is made not in account_reminder module. I agree that it's of dubious value. That being said, core is core and you deal with it warts and all.
What I can try to do is to work around this but no promises that it will solve all of your problems. Patches always welcome as well.
Comment #9
JimBroad commentedRather than using user_save() would using an update query as in this patch or perhaps drupal_write_record() do the trick?
Comment #10
JimBroad commentedAlso attaching 1.2 patch, previous was for 6.x-1.x-dev
Comment #11
lubnax commentedsubscribe
Comment #12
jaydub commented