25 require_once(
"../class/config.php");
28 "login" => array (
"request",
"string",
""),
29 "pass" => array (
"post",
"string",
""),
30 "passconf" => array (
"post",
"string",
""),
31 "confirm" => array (
"post",
"string",
""),
36 if (!$aws->login_exists(
$login)) {
37 include(
"aws_users.php");
42 if (empty($pass) || is_null($pass)) {
43 $msg->raise(
'Error',
"aws", _(
"Please enter a password"));
44 }
else if ($pass != $passconf) {
45 $msg->raise(
'Error',
"aws", _(
"Passwords do not match"));
47 if ($aws->change_pass(
$login,$pass)) {
48 $msg->raise(
'INFO',
"aws", _(
"Password successfuly updated"));
49 include(
"aws_users.php");
55 include_once(
"head.php");
57 $c=$admin->listPasswordPolicies();
61 <h3><?php
__(
"Change a user's password"); ?></h3>
63 echo
$msg->msg_html_all();
66 <form method=
"post" action=
"aws_pass.php" name=
"main" id=
"main">
68 <input type=
"hidden" name=
"confirm" value=
"1" />
71 <?php
__(
"Username"); ?></th><td>
72 <code><?php echo
$login; ?></code> <input type=
"hidden" name=
"login" value=
"<?php echo $login; ?>" />
75 <tr><th><label
for=
"passconf"><?php
__(
"Confirm password"); ?></label></th><td><input type=
"password" class=
"int" name=
"passconf" id=
"passconf" value=
"" size=
"20" maxlength=
"64" /></td></tr>
76 <tr
class=
"trbtn"><td colspan=
"2">
77 <input type=
"submit" class=
"inb" name=
"submit" value=
"<?php __("Change
this user
's password"); ?>" />
78 <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='aws_users.php
'"/>
83 <script type="text/javascript">
84 document.forms['main
'].pass.focus();
85 document.forms['main
'].setAttribute('autocomplete
', 'off
');
89 <?php include_once("foot.php"); ?>
const DEFAULT_PASS_SIZE
Define constants from vars of /etc/alternc/local.sh The you can't choose where is the AlternC Panel.
display_div_generate_password($pass_size=DEFAULT_PASS_SIZE, $fields_to_fill1="", $fields_to_fill2="", $classcount=3)
Show a button to set a random password for a password field.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...