Posted by dww on November 6, 2009 at 10:23pm
| Project: | Email Registration |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | dww |
| Status: | needs work |
Issue Summary
It'd be nice if the default logic in email_registration_user() when no module implements hook_email_registration_name() lived in a separate helper function instead of being embedded directly into email_registration_user(). That'd make it easier to write unit tests for it, and it'd allow someone to reuse the same logic when importing users via migrate module, for example.
Comments
#1
#2
Seems reasonable to me though I'm not sure if the abstraction should work the way it does or if it should include the call that invokes the hooks of other modules.
That is, if a site has setup a email_registration and written a hook that changes the way names are generated then I would expect that hook to be used if they called this function directly.
#3
Ahh, good point.