Account Reminder Auto Activating Users That Are Not Validated

sarmiluv - August 15, 2009 - 05:32
Project:Account reminder
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

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.

#1

jaydub - August 28, 2009 - 17:51

What 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?

#2

sarmiluv - August 29, 2009 - 20:57

I 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.

#3

jaydub - September 11, 2009 - 05:50

Did 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:

    // Consider users edited by an administrator as logged in, if they haven't
    // already, so anonymous users can view the profile (if allowed).
    if (empty($array['access']) && empty($account->access) && user_access('administer users')) {
      $array['access'] = time();
    }

 
 

Drupal is a registered trademark of Dries Buytaert.