Account unblocked too early

modctek - September 18, 2008 - 21:59
Project:Invite
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

With my website user account creation settings set to to "requires admin approval" and using the Invitation module, my invitees are able to create an account, after which they receive the standard "your account is pending admin approval." However, on the website, the accounts are listed as active. The only way I can force the website to send the initial login email with the one-time link is to block, then unblock the new accounts. Is this by design?

#1

smk-ka - September 18, 2008 - 23:08

This looks like a bug, will have to investigate.

#2

Bevan - June 12, 2009 - 06:52
Title:Account Created by Invitation, marked as active, but no password?» Account unblocked to early
Category:support request» bug report
Priority:normal» critical
Status:active» needs review

Judging by the following code in _invite_accept(), this appears to be by design;

<?php
 
// Unblock user account.
 
db_query("UPDATE {users} SET status = 1 WHERE uid = %d", $account->uid);
?>

But I can't imagine why this would make sense. Possibly because the user's email address has already been confirmed, but clicking the invite email? This doesn't make sense though either, since the user may have registered using a different email address to the one the invite was sent to.

I'm happy to patch this and have time over the next few days. Please advise the best way forward.

#3

Bevan - June 12, 2009 - 06:52
Component:User interface» Code

#4

Bevan - June 15, 2009 - 12:15
Title:Account unblocked to early» Account unblocked too early

#5

Bevan - June 16, 2009 - 00:06

In a patch file...

AttachmentSize
310473.patch 770 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.