Created
May 19, 2014 16:38
-
-
Save Taiger/234e69275f3104915e4b to your computer and use it in GitHub Desktop.
Print or render Drupal user account profile form anywhere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$account = user_load(UID); | |
module_load_include('inc', 'user', 'user.pages'); | |
$form_state = array(); | |
$form_state['build_info']['args'] = array($account); | |
form_load_include($form_state, 'inc', 'user', 'user.pages'); | |
print render(drupal_build_form('user_profile_form', $form_state)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Someone said: you should call drupal_get_form and not drupal_build_form
no need for form_load_include