X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=ng_selfservice%2Fpassword.php;h=a6e67951a0171ec58b201af46291e558369dca6a;hb=e928101f860813b7485e79ea549e736f69c50948;hp=41296ed2dd7f5aee5a61d26e4042030b32dd91e3;hpb=3564f619654c5cbf22fc2acbe7eff0c08308e859;p=freeside.git diff --git a/ng_selfservice/password.php b/ng_selfservice/password.php index 41296ed2d..a6e67951a 100644 --- a/ng_selfservice/password.php +++ b/ng_selfservice/password.php @@ -1,5 +1,92 @@ $title ='Change Password'; include('elements/header.php'); ?> $current_menu = 'password.php'; include('elements/menu.php'); ?> -Chagne password + +$error = ''; +$pwd_change_success = false; +if ( isset($_POST['svcnum']) ) { + + $pwd_change_result = $freeside->myaccount_passwd(array( + 'session_id' => $_COOKIE['session_id'], + 'svcnum' => $_POST['svcnum'], + 'new_password' => $_POST['new_password'], + 'new_password2' => $_POST['new_password2'], + )); + + if ($pwd_change_result['error']) { + $error = $pwd_change_result['error']; + } else { + $pwd_change_success = true; + } +} + +if ($pwd_change_success) { +?> + +
Password changed for echo $pwd_change_result['value'],' ',$pwd_change_result['label'] ?>.
+ + +} else { + $pwd_change_svcs = $freeside->list_svcs(array( + 'session_id' => $_COOKIE['session_id'], + 'svcdb' => 'svc_acct', + )); + if (isset($pwd_change_svcs['error'])) { + $error = $error || $pwd_change_svcs['error']; + } + if (!isset($pwd_change_svcs['svcs'])) { + $pwd_change_svcs['svcs'] = $pwd_change_svcs['svcs']; + $error = $error || 'Unknown error loading services'; + } + if ($error) { + include('elements/error.php'); + } +?> + + + + +} // end if $pwd_change_show_form +?> + include('elements/menu_footer.php'); ?> include('elements/footer.php'); ?>