email_registration.api.php 736 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @file
  4. * Documentation for email_registration API.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Implement this hook to generate a username for email_registration module.
  12. *
  13. * Other modules may implement hook_email_registration_name($edit, $account)
  14. * to generate a username (return a string to be used as the username, NULL
  15. * to have email_registration generate it).
  16. *
  17. * @param $edit
  18. * The array of form values submitted by the user.
  19. * @param $account
  20. * The user object on which the operation is being performed.
  21. *
  22. * @return
  23. * A string defining a generated username.
  24. */
  25. function hook_email_registration_name($edit, $account) {
  26. return 'u' . $account->uid;
  27. }
  28. /**
  29. * @} End of "addtogroup hooks".
  30. */