summaryrefslogtreecommitdiff
path: root/utils/admin_user.php
diff options
context:
space:
mode:
authordeva <deva>2008-10-04 10:38:03 +0000
committerdeva <deva>2008-10-04 10:38:03 +0000
commitcce5e7710295021b41d9aaecc503a60fb99256be (patch)
tree660235be91fb821e976c7ae62347eb368ce87524 /utils/admin_user.php
Initial revision
Diffstat (limited to 'utils/admin_user.php')
-rw-r--r--utils/admin_user.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/utils/admin_user.php b/utils/admin_user.php
new file mode 100644
index 0000000..42ed784
--- /dev/null
+++ b/utils/admin_user.php
@@ -0,0 +1,32 @@
+<h2>Password</h2>
+<?php
+include_once($UTIL_DIR."/user.php");
+include_once($UTIL_DIR."/convert.php");
+
+if($task == "setpassword") {
+ $users = new Users($DATA_DIR . "/users.xml");
+ $user = $users->findUser($HTTP_COOKIE_VARS["UserID"]);
+ $user->setPassword($oldpassword, $password1, $password2);
+ $users->add($user); // We need to update the user after changing the password!
+ $users->write();
+}
+?>
+
+<div class="small_header">Change password</div>
+<form method="post" action="?page=admin&amp;module=user&amp;task=setpassword">
+ <p>
+ Old password:
+ <input type="password" name="oldpassword" style="width: 100px;" value=""/
+ </p>
+ <p>
+ New password:
+ <input type="password" name="password1" style="width: 100px;" value=""/>
+ </p>
+ <p>
+ Confirm password:
+ <input type="password" name="password2" style="width: 100px;" value=""/>
+ </p>
+ <p>
+ <button type="submit">Change password</button>
+ </p>
+</form>