? account_profile-929344-1.patch
? account_profile-929344.patch
Index: account_profile.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/account_profile/account_profile.module,v
retrieving revision 1.1.2.11
diff -u -p -r1.1.2.11 account_profile.module
--- account_profile.module	26 Oct 2010 17:43:01 -0000	1.1.2.11
+++ account_profile.module	19 Nov 2010 12:46:47 -0000
@@ -57,9 +57,10 @@ function account_profile_form_alter(&$fo
     break;
     case $profile . '_node_form':
       /* integration with account form */
-      if (is_numeric(arg(1)) && $user = user_load(arg(1))) { // activate only on edit page (not on registration page)
+      $uid = is_numeric(arg(1)) ? arg(1) : $form['uid']['#value'];
+      if (isset($form['uid']) && $user = user_load($uid)) { // activate only on edit page (not on registration page)
           module_load_include('pages.inc', 'user');
-          $account_form = user_profile_form(array(), $user);
+          $account_form = user_profile_form($form_state, $user);
           unset($account_form['submit'], $account_form['delete']); // remove duplicated Save button and Delete
           $form = array_merge($account_form, $form);
           $form['#validate'][] = 'account_profile_form_validate';
@@ -83,9 +84,9 @@ function account_profile_form_alter(&$fo
 function account_profile_menu_alter(&$items) {
     $profile = variable_get('account_profile_main_profile', key(content_profile_get_types('names'))); // get main profile name
     $disable_edit_tab = variable_get('account_profile_edit_tab', TRUE) ;
-    $items['user/%user_category/edit/' . $profile]['type'] = MENU_CALLBACK; // remove content profile tab
+    $items['user/%user/edit/' . $profile]['type'] = MENU_CALLBACK; // remove content profile tab
     if ($disable_edit_tab) {
-      $items['user/%user_category/edit']['type'] = MENU_CALLBACK;
+      $items['user/%user/edit']['type'] = MENU_CALLBACK;
     }
 }
 
@@ -113,7 +114,7 @@ function account_profile_form_validate($
  * Submit function for the user account and profile editing form.
  */
 function account_profile_form_submit($form, &$form_state) {
-
+  
   $account = $form_state['values']['_account'];
   // add username
   $username = $form_state['clicked_button']['#post']['name'];
