ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: scripple on March 14, 2014, 03:01:03 am

Title: integrate_register_after hook not called for admin registration
Post by: scripple on March 14, 2014, 03:01:03 am
As the subject says, the integrate_register_after hook is not called if a user is registered using the admin interface.  This means that integrations would not be aware of those members being added.  Probably not the way it would work. 

I think
  // If they are for sure registered, let other people to know about it
  call_integration_hook('integrate_register_after', array($regOptions, $memberID));

Should also be placed above these lines in registerMember() in Members.subs.php
    // All admins are finished here.
    return $memberID;

So that the integration function is called whenever a member is registered.
Title: Re: integrate_register_after hook not called for admin registration
Post by: scripple on March 14, 2014, 03:35:16 am
See also http://www.elkarte.net/community/index.php?topic=1198.0 in regards to a conflict with the naming of this hook.
Title: Re: integrate_register_after hook not called for admin registration
Post by: emanuele on March 14, 2014, 09:32:53 am
And here it is the fix:
https://github.com/emanuele45/Dialogo/commit/86f6dbd190bd1ebf03fd29f8207b999082f05aa8
I preferred to keep just one call and use an else to skip what should be only for the non-admin interface.

Updated the commit, in the previous there was a mistake... :-[