the alternative was to create a new module based onthe chgpwd module and copy the user/%/edit form into a new tab and then hide the feilds you dont want.
Again, I was able to do this and have the forms function, but i wasnt able to hide the unwanted forms..
/**
* Implementation of hook_menu().
*/
function blog_settings_menu() {
$items['user/%user_category/edit/blog_settings'] = array(
'title' => 'Blog Settings',
'page callback' => 'theme_blog_settings_page',
'page arguments' => array(1),
'access callback' => 'user_edit_access',
'access arguments' => array(1),
'file' => 'user.pages.inc',
'file path' => drupal_get_path('module' , 'user') . '/',
'load arguments' => array('%map', '%index'),
'type' => MENU_LOCAL_TASK,
);
return $items;
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function blogtheme_form_user_profile_form_alter(&$form, $form_state) {
// category will be 'account'
//$categoy = $form['_category']['#value'];
if (is_null(arg(3)) || arg(3) == 'account'){
// to hide from default user edit
$form['account']['blog_theme']['#access'] = FALSE;
}else if (arg(3) == 'blog_settings'){
$form['account']['#title'] = t('Blog Settings');
// hide other than password
foreach($form as $mkey=>$mval){
if ($mkey == 'account'){
foreach($form['account'] as $akey=>$aval){
// hide all but pass
if ($akey != 'blog_theme' && is_array($form['account'][$akey])){
$form['account'][$akey]['#access'] = FALSE;
}
}
}else{
$ignore = array(
'_category', '_account', 'submit', '#attributes',
'#parameters', '#build_id', '#type', 'form_build_id',
'form_token', 'form_id', '#parents', '#validate',
'#submit',
'blog_theme_current', // for password_change module
);
// just hide it
if (!array_search($mkey, $ignore) && is_array($form[$mkey])){
$form[$mkey]['#access'] = FALSE;
}
}
}
$form['account']['blog_theme']['#required'] = TRUE;
$form['submit']['#value'] = t('Blog Settings');
}
}
function theme_blog_settings_page($account, $category = 'account'){
drupal_set_title(t('Blog Settings'));
return drupal_get_form('user_profile_form', $account, $category);
}
/**
* Implementation of hook_user().
*/
function blog_settings_user($type, &$edit, &$account, $category = NULL) {
if ($type == 'categories') {
return array(array('name' => 'blog_settings', 'title' => t('Blog Settings'), 'weight' => 1));
}
}