Closed (duplicate)
Project:
Email Registration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
6 Nov 2009 at 22:23 UTC
Updated:
27 Dec 2012 at 17:17 UTC
Jump to comment: Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 625734-1.email_registration_email_to_name.patch | 2.55 KB | dww |
Comments
Comment #1
dwwComment #2
gregglesSeems 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.
Comment #3
dwwAhh, good point.
Comment #4
gregglesWork on this is now in #421078: Abstract name unique check for re-use, make it is cross-database compatible, make it more robust, us it on external names.