Adding Hooks
What's the general thought on adding or modifying hooks? I'm looking at 1.1 and all the code edit mods I have to update and hoping new hooks would make it easier but not finding them. First example I'm looking at right now is I add additional info in the function loadExistingMember which is called from action_login2. Sure, I could hook onto the end of login2 except I actually check that information to make a yes/no decision on the login and doLogin would already be called.
So a last hook before doLogin that would allow me to set a failure variable checked before doLogin was called as well as set $context['login_errors'] would be nice.
A lot of the other changes are still in Post and all the is_allowed type stuff. I haven't checked, but have hooks been added to all those functions to modify their results?
Re: Adding Hooks
Reply #2 –
Doing it in the hook you mention requires me to basically copy all of loadExistingMember which seems pointless as I need the user ID which is what loadExisting member does it try the different ways to find it. I'll just stick with the simple code mods. Same conclusion I came to on 1.0. I suspect that will be the case in general in 1.1 as well.
Most of my mods in post are modifications to the allow functions. None of the cases you mentioned makes me think triggers will help that but I'll have to look into it.
I do agree the "NEW" indicator in posts should be part of core.
I get the gist though, no new hooks. That's ok code mods don't bother me much.