saving changes $userent =& $config['system']['user'][$userindex[$_SESSION['Username']]]; local_user_set_password($userent, $_POST['passwordfld1']); local_user_set($userent); unset($userent); session_commit(); write_config(); $savemsg = gettext("Password successfully changed."); } } if (!session_id()) { session_start(); } /* determine if user is not local to system */ $islocal = false; foreach ($config['system']['user'] as $user) { if ($user['name'] == $_SESSION['Username']) { $islocal = true; } } session_commit(); include("head.inc"); if ($input_errors) { print_input_errors($input_errors); } if ($savemsg) { print_info_box($savemsg, 'success'); } if ($islocal == false) { echo gettext("The password cannot be changed for a non-local user."); include("foot.inc"); exit; } $form = new Form(); $section = new Form_Section('Update Password'); $section->addInput(new Form_Input( 'passwordfld1', 'Password', 'password' )); $section->addInput(new Form_Input( 'passwordfld2', 'Confirmation', 'password' ))->setHelp('Select a new password'); $form->add($section); print($form); include("foot.inc");