Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <?php
  2.  
  3. function axelerant_custom_username_form($form, &$form_state) {
  4. $default_user = user_load(3);
  5.  
  6. $form['name'] = array(
  7. '#type' => 'textfield',
  8. '#title' => t('Search for Contributor'),
  9. '#autocomplete_path' => 'user/autocomplete',
  10. '#default_value' => $default_user->name,
  11. '#required' => TRUE,
  12. );
  13.  
  14. return $form;
  15. }
  16.  
  17. /**
  18. * Implements hook_actions_delete().
  19. */
  20. function axelerant_custom_username_form_submit($form, &$form_state) {
  21. $name = trim($form_state['values']['name']);
  22. $user = user_load_by_name($name);
  23. // form_set_value($form['name'], $user->uid, $form_state);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement