PDA

View Full Version : When user update email they end up in "Users Awaiting Moderation"


Castel
Wed 21st Mar '01, 4:58pm
I have both Email Verification and Moderate Registration turned on.

Long time users end up in "Users Awaiting Moderation" when they update their email in the profile. This shouldn't happen. Their registration was already approved along time ago and now they have to wait until an admin re approves just because they changed email in the profile?

I think that should be changed in the next version.

Wayne Luke
Wed 21st Mar '01, 7:57pm
Actually this was just changed to accomodate this.

Every time they change their email they will have to re-activate their account. They should receive an email at the address they put into their profile.

bira
Wed 21st Mar '01, 8:35pm
Castrel, I don't know about you but I don't want people registering with a valid e-mail address, and then changing that address to a made-up, non-existant address.

The only way to make sure that the e-mail is always valid is to make them re-activate their account after every e-mail change.

That's a feature I really really wanted, and I am very glad for one that it was added.

Sharg
Wed 21st Mar '01, 8:57pm
Well its a good feature but easy to cheat as I reported in another post :(

Castel
Wed 21st Mar '01, 11:35pm
Originally posted by wluke
Actually this was just changed to accomodate this.

Every time they change their email they will have to re-activate their account. They should receive an email at the address they put into their profile.

Maybe it wasn't clear in the post. I just don't want them ending up having to wait 6-8 hours for an admin to activate their account again.

Bira, I agree completely. They should have to verify email again. But after they do that they end up in the "(COPPA) Users Awaiting Moderation" group .That doesn't make sense

Wayne Luke
Thu 22nd Mar '01, 12:58am
They shouldn't have to wait 6-8 hours to activate their account again.

They receive an activation email immediately which will have a link in it that once followed will re-activate their account.

And actually they should end up in user-group for "Users Awaiting Confirmation" when they change their accounts.

Castel
Thu 22nd Mar '01, 1:35am
Grrr...to much miscommunication.

I use both :

- Email verification
- Moderate registrations


Now when an already registered user changes his/her email, he/she will be send a mail to verify. That's cool, it should be that way. Now that already registered user is in the "User Awaiting Email Confirmation"

User confirms email by clicking the link.

Now that long time user ends up in "Users Awaiting Moderation". Why should his/her registration be approved again? He/she been a member for months/years. So he/she has to wait until the registration gets approved once more. Which could be hours. I'm not exactly camping out so see new registrations.

My point is. If there is an already "Registered" user changing the email he/she should be able to resume posting right away after confirming email.

Are we on the same page now?

Slider19
Thu 22nd Mar '01, 1:52am
I understand you completely and I agree!

Wayne Luke
Thu 22nd Mar '01, 9:19am
My users are able to post again immediately after they confirm their new email address by following the link in the confirmation/re-activation email they receive.

It seems to me that either:
1) Your users aren't following the re-activation instructions emailed to them.

or

2) They are giving you bogus email addresses so that you can't send them email and are unable to re-activate your account.

tubedogg
Thu 22nd Mar '01, 12:12pm
Wayne: SPF doesn't do new user moderation. I think that's what Castel's saying - he requires new user moderation, and every time they give a new email address, they end up back in the Users awaiting moderation group because of that.

Wayne Luke
Thu 22nd Mar '01, 12:29pm
Actually we do. ;)

tubedogg
Thu 22nd Mar '01, 12:32pm
Oh, you do? I almost posted it as a question, rather than a statement. :) My bad.

Castel
Thu 22nd Mar '01, 2:20pm
Okay, so it's not supposed to happen. Maybe I should have posted this in Bug Report. It was the only reason I could think of why some of my long time users who already have post counts end up in the "Awaiting Moderation Group"

I've seen it happen about 5-6 times now.

bira
Fri 23rd Mar '01, 12:19am
I made a few changes to the code as it appears in vB2beta3, because in the official code, a user who changes his e-mail address moves to the "users awaiting e-mail confirmation" group, and then, after activation, he moves to either the "registered" group or the "user awaiting moderation" group.

That is not what I wanted.

I have several usergroups and I wanted users to be able to be reinstated BACK to their original group after re-activation.

So here are the changes I made (and they work 100% fine):

1. Open member.php and find, around line 412, this code:


if ($verifyemail and $email!=$bbuserinfo['email'] and $bbuserinfo['usergroupid']!=6) {
$newemailaddress=1;
$activateid=$bbuserinfo['joindate'];
$username=unhtmlspecialchars($bbuserinfo['username']);
$userid=$bbuserinfo['userid'];


Immediately below it, add:


$usergroupid=$bbuserinfo['usergroupid'];


2. Open register.php and find, around line 446, this code:


$u=$userinfo[userid];
$a="act";
$i=$activateid;


Immediately below it, add:


$g="2";


Find, around line 458, this code:


if ($i!=$userinfo[joindate]) {
// send email again
eval("standarderror(\"".gettemplate("error_invalidactivateid")."\");");
exit;
}


Immediately below it, add:


if (($g=="") || ($g=="6")) {
// makes sure a user doesn't try to re-activate himself as an admin or without a usergroup
eval("standarderror(\"".gettemplate("error_invalidactivateid")."\");");
exit;
}


Find, around line 472, this code:


// activate account
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid='$u'");


and REPLACE it with:


// activate account
$DB_site->query("UPDATE user SET usergroupid='$g' WHERE userid='$u'");



3. Go to the Control Panel, and open the template email_activateaccount_change.

Replace this link (APPEARS TWICE):


$bburl/register.php?a=act&u=$userid&i=$activateid


with


$bburl/register.php?a=act&u=$userid&i=$activateid&g=$usergroupid



Replace this link:


$bburl/register.php?a=ver&g=$usergroupid


4. Open templalte email_activateaccount

Replace this link (apears TWICE):


$bburl/register.php?a=act&u=$userid&i=$activateid


with


$bburl/register.php?a=act&u=$userid&i=$activateid&g=2


And replace this link:


$bburl/register.php?a=ver


with


$bburl/register.php?a=ver&g=2



5. Open template activateform

Find


<INPUT TYPE="Submit" NAME="SUBMIT" VALUE="Submit Now">


And above it ADD:


<input type="hidden" name="g" value="$g">



Upload the edited php files, and that's it -- a user who changes his e-mail address will be reinstated, after activation, to his original usergroup, whichever that was.


Cheers,

Bira

Castel
Fri 23rd Mar '01, 2:40pm
Thanks, bira. Finally a solution to this problem :)

JamesUS
Fri 23rd Mar '01, 3:50pm
Surely that is risky because someone could reinstate themselves as a Super Mod or some other user group? It needs to be only what it was before really.

bira
Sat 24th Mar '01, 12:49am
JamesUS I don't have Super Moderators (I disabled this usergroup), but you can exempt any usergroup you want in these lines:

1) in the original member.php find


if ($verifyemail and $email!=$bbuserinfo['email'] and $bbuserinfo['usergroupid']!=6) {


And add to it any other usergroup you want to exempt (eg $bbuserinfo['usergroupid']!=5 to exempt Super Moderators)

2) In the hack I posted previous, change


if (($g=="") || ($g=="6")) {


to include any other usergroup you don't want the user to be able to include (eg if (($g=="") || ($g=="6") || ($g=="5")) ) to exclude Super Moderators ugid.