MyBB Community Forums

Full Version: MyAlerts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ah. I hook into that same hook. I'd assume that's what happening is that your hook has higher priority than the MyAlerts one. Try changing your hook to this:

$plugins->add_hook('member_do_register_end', 'redirectafterregistration_do', 100);

It does definitely work on my minimal local install where I only have MyAlerts and SimpleLikes installed.
Yup, that fixed it. Thank you.

What does that 100 added to the line actually do?
It's the hook priority. Every hook has a priority of 10 by default, lower values mean higher priority and viceversa. Setting a priority of 100 makes sure the hooked function will be executed after every other hook if none of them has an higher priority.
Hmm, your facebook plugin also hooks into the member_do_register_end doesn't it? Does that also have a priority?
Not really. It contains a copy of the hook, so all the code that hooks into member_do_register_end from external plugins will be executed also when registering with Facebook. The registration process is in a stand-alone function, unrelated from the default MyBB's one, so it doesn't cause any problem at all.
(2013-07-02, 08:29 PM)Leefish Wrote: [ -> ]Yup, that fixed it. Thank you.

What does that 100 added to the line actually do?

Big Grin Glad we finally got to the bottom of it.
Hi Euan, install the mod on my forum, but I have problems with the popup, maybe you could help me, my forum is http://desload.net Thanks
^ you need to explain what is happening and giving a test user account helps in providing precise suggestions
Yes, you need to explain the actual issue you are having to let me help.
(2013-07-02, 06:47 PM)Euan T Wrote: [ -> ]Right, I just pushed version 1.05. Not any major changes, more of a slight cleanup and merging Shade's suggested change. To download 1.05, please click here: https://github.com/euantorano/MyAlerts/archive/1.05.zip

@Leefish: I looked into the registration problem and it works perfectly fine locally. Odd that it shouldn't work for your site. How it works is:

- User registers
- All alert settings for that user are automatically enabled

thanks for the update Big Grin