there's a setting in admin's profile whether or not to receive e-mails when a new user has registered. Both the code in /scripts/adduser.inc.php and /scripts/verifyemail.inc.php does not work (well, it's the same piece of code )
The problem is in this line:
PHP:
if (!$config['NEW_USER_MODERATION'] && !$notify_newuser) {
Since $notify_newuser is always 0 or 1, it always has a value.
I fixed it locally by moving this check into the query instead of in the code. Did the same for the admin e-mail check that's there.
I'm gonna testrun the code now and place it here for anyone looking to fix this.
Update: analysed why it goes wrong wrong, but the bug is there!
Whether that code is fine or not, I don't know for sure, it was my primary suspect, I do know the setting is ignored because I gets loads of new user notifications while the setting for me is off
update: okay, did a codetest, you are right. But somehow somewhere else on the road it goes wrong, because the bug itselve is definitely there.
i see, at 2nd blush there looks to be a small 'buglet'
hehe, I only just noticed it because I changed a bit in the board name (we have a tagline that I moved to the "Powered by" language string. So my mail blocks weren't working anymore.
Well, the checks done in the code can be done in the query
#197970 - 09/23/0703:24 PMRe: [7.2.2] New user e-mail notification setting does not work
[Re: blaaskaak]
Sirdude
Registered: 04/19/07
Posts: 2081
Loc: SoCal, USA
hrm...
there are 2 settings 'EMAIL_VERIFICATION' and 'NEW_USER_MODERATION'
1st one is whether the new user needs to verify their email. 2nd one is whether or not the new users get placed in a queue to be accepted or declined.
as i see it.
and currently the question asked of the admin in their preferences is if they want to be notified on any new user registration. there is really noting about whether an approval is required.
so if you want to take it to the extreme, the admin gets emails if he likes them and those emails are either : 'hey a new user signed up' or 'hey a new user signed up and needs you to approve the poor bashtid'