Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 registered (djcheez, Flyin V, Island Piper), 19 Guests and 30 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 24
Top Posters (30 Days)
Rick 126
Gizmo 101
Thelockman 53
AllenAyres 48
driv 47
ScriptKeeper 37
blaaskaak 35
Morgan 33
flyboy105 27
ntdoc 22
Latest Photos
Christmas in Gizzyville
Blonde Batman...
Sunset Between Boarders
My two favorite words..
XTERRA K9 Challenge
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#197956 - 09/23/07 02:37 PM [Fixed 7.3][7.2.2] New user e-mail notification setting does not work
blaaskaak Offline


Registered: 08/30/06
Posts: 1263
Loc: Breda, NL
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!
_________________________

Top
#197960 - 09/23/07 02:54 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2052
Loc: SoCal, USA
that code is fine.

you realize that !0 --> true and !1 --> bummer, right ?
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top
#197961 - 09/23/07 02:54 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: blaaskaak]
blaaskaak Offline


Registered: 08/30/06
Posts: 1263
Loc: Breda, NL
This my replacement code.

Update: Removed it. Was no good.


Edited by blaaskaak (09/23/07 03:24 PM)
_________________________

Top
#197963 - 09/23/07 02:55 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: Sirdude]
blaaskaak Offline


Registered: 08/30/06
Posts: 1263
Loc: Breda, NL
 Originally Posted By: Sirdude
that code is fine.


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.


Edited by blaaskaak (09/23/07 02:59 PM)
_________________________

Top
#197964 - 09/23/07 03:02 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2052
Loc: SoCal, USA
ok, so your config must be set to 1 then. so !1 && !0 is killing that if and forcing an unwanted email.

i see, at 2nd blush there looks to be a small 'buglet' \:\)
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top
#197965 - 09/23/07 03:06 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: Sirdude]
blaaskaak Offline


Registered: 08/30/06
Posts: 1263
Loc: Breda, NL
 Originally Posted By: Sirdude
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 \:\)
_________________________

Top
#197966 - 09/23/07 03:10 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2052
Loc: SoCal, USA
except for the $config check. that turns it off, regardless if admins like emails.

so to me i see the $config check must be true, then any admin who wants emails gets them. right ?
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top
#197967 - 09/23/07 03:12 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: Sirdude]
blaaskaak Offline


Registered: 08/30/06
Posts: 1263
Loc: Breda, NL
Well, the whole block should not be run according to the config setting. It should not be checked inside the loop.
_________________________

Top
#197970 - 09/23/07 03:24 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2052
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'

no ?
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top
#198018 - 09/24/07 07:30 AM Re: [7.2.2] New user e-mail notification setting does not work [Re: Sirdude]
blaaskaak Offline


Registered: 08/30/06
Posts: 1263
Loc: Breda, NL
 Originally Posted By: Sirdude
no ?


Basicly, that's a yes \:\)

As long as I don't get those mails \:D
_________________________

Top
#200923 - 11/08/07 09:55 PM Re: [7.2.2] New user e-mail notification setting does not work [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2052
Loc: SoCal, USA
Fixed 7.3 \:\)
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top
Page 1 of 2 1 2 >


Shout Box

Today's Birthdays
ax, bigatom
Recent Topics
Image Verification issues
by intouchweb
Today at 05:54 PM
How do I search for Numeric strings in posts
by Ruben Rocha
Today at 02:35 PM
wrong count of members in a group
by Zarzal
Today at 02:34 PM
Last Post Column
by zoomeister
Today at 12:27 AM
Account Suspended... any clues?
by jgeoff
Yesterday at 07:02 PM
Forum Stats
4156 Members
33 Forums
30238 Topics
153144 Posts

Max Online: 978 @ 06/24/07 08:19 PM