diff --git a/includes/account.php b/includes/account.php index 18630fc..5d6c8b0 100644 --- a/includes/account.php +++ b/includes/account.php @@ -1731,7 +1731,7 @@ exit; } - if(($id == 42 || $id == 43 || $oldid == 42 || $oldid == 43) && $_SESSION['profile']['admin'] != 1) + if(($id == 42 || $id == 43 || $id == 44 || $oldid == 42 || $oldid == 43 || $oldid == 44) && $_SESSION['profile']['admin'] != 1) { showheader(_("My CAcert.org Account!")); echo _("You don't have access to this area."); @@ -1751,6 +1751,32 @@ unset($oldid); } + if($id == 44) + { + if($_GET['userid'] != "") + $_POST['userid'] = intval($_GET['userid']); + $row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_POST['userid']."'")); + if($row['email'] == "") + $id = 42; + else + $_POST['email'] = $row['email']; + } + + if($oldid == 44) + { + showheader(_("My CAcert.org Account!")); + if(intval($_POST['userid']) <= 0) + { + echo _("No such user found."); + } else { + mysql_query("update `users` set `password`=password('".mysql_escape_string(stripslashes($_POST['newpass']))."') where `id`='".intval($_POST['userid'])."'"); + $row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_POST['userid']."'")); + printf(_("The password for %s has been updated sucessfully in the system."), $row['email']); + } + showfooter(); + exit; + } + if(intval($cert) > 0) $_SESSION['_config']['cert'] = intval($cert); if(intval($orgid) > 0) diff --git a/includes/account_stuff.php b/includes/account_stuff.php index 8c27a99..e108356 100644 --- a/includes/account_stuff.php +++ b/includes/account_stuff.php @@ -73,7 +73,8 @@ case 34: case 35: $expand = " explode('orgadmin');"; break; case 42: - case 43: $expand = " explode('sysadmin');"; break; + case 43: + case 44: $expand = " explode('sysadmin');"; break; case 500: case 501: case 502: @@ -161,7 +162,7 @@ function hideall() {

+

- +