Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hook "member_register_start" called twice, is this a bug or something?
I noticed during registration, hook "member_register_start" (member.php) is called twice.

First time when click "I agree" on agreement page, then the 2nd time when you submit the registration form.

Is there a reason for doing so or bug? I don't think a hook should be called more than once.
Is that so?

I think first one is:

and the second one is:
That's what I thought too, but it actually is:

On submitting agreement form:

On submitting registration form:
'member_register_start' (again)
That doesn't happen by default. member_register_start is only called once.

./member.php:447:		$plugins->run_hooks("member_register_start");

Have you tried a file verification run?
No longer involved in the MyBB project.
I found it right after upgrading to 1.6.12, so they are latest version and I didn't modify anything.

The hook only appears one place in "member.php", but "member.php" is posted twice during registration, the same code piece which begin with "member_register_start" get hit again. I found this because I added a function to member_register_start and it was implemented again when submitting registration form which is not expected.
I can see only one member_register_start hook in 1.6.12 which gets called only once. Verify your files in ACP -> Tools & Maintenance and check if other plugins modify registration.

Forum Jump:

Users browsing this thread: 1 Guest(s)