I have this code

global $user;
$uid = $user->uid;
if ($uid > 0) {
  include_once drupal_get_path('module', 'user') . '/user.pages.inc';
  print(drupal_get_form('user_profile_form', $user));
}

which prints the whole user/%/edit form.

Now im trying to just print certain parts, such as upload picture, so I try to inlude edit-picture-upload, somewhere into the code, but it doesnt do what im trying to do.

Can I do this and how?

Thanks for any advice.

Comments

agile’s picture

I too have the same..

fildawg’s picture

Add $category. For example, if my category is Address:

<?php
global $user;
$uid = $user->uid;
if ($uid > 0) {
  include_once drupal_get_path('module', 'user') . '/user.pages.inc';
$category = 'Address';
  print(drupal_get_form('user_profile_form', $user, $category));
}
?>

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.