[support] including profile edit form on a page...
Kevin Davison
kevin at quevin.com
Fri Sep 3 20:16:56 UTC 2010
The following PHP is what I have in a page.tpl.php, and it worked before I upgraded Drupal 6.14 to 6.19 and enabled clean URLs (with Pathauto).
Now when I submit a profile edit, the page just reloads quickly, but nothing is written to the database. Anyone know why? Need more info? Thanks!
<?php
global $user;
// if the user is logged in
if ($user->uid > 0) {
module_load_include('inc', 'user', 'user.pages');
profile_load_profile($user);
print(drupal_get_form('user_profile_form', $user, 'Personal Information'));
}
else {
// do something else
}
?>
OLD CODE...
<?php /*
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));
profile_load_profile($user);
// var_dump($user);
print(drupal_get_form('user_profile_form', $user, 'Personal Information'));
}
*/
?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100903/ef757c8f/attachment.html
More information about the support
mailing list