-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathDoEditPwd.php
36 lines (32 loc) · 919 Bytes
/
DoEditPwd.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require_once('config.php');
require_once('modules/Users/Users.php');
require_once('include/logging.php');
require_once('include/utils/UserInfoUtil.php');
require_once('include/utils/utils.php');
global $adb;
$focus = new Users();
if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '')
{
$focus->mode='edit';
$focus->id = $_REQUEST["record"];
}
else
{
$focus->mode='';
}
if($_REQUEST['changepassword'] == 'true')
{
$focus->retrieve_entity_info($_REQUEST['record'],'Users');
$focus->id = $_REQUEST['record'];
if (isset($_REQUEST['new_password'])) {
if (!$focus->change_password($_REQUEST['old_password'], $_REQUEST['new_password'])) {
redirect("index.php?action=Error&module=Home&error_string=".urlencode($focus->error_string));
exit;
}else{
echo "<script>alert('密码修改成功');</scr"."ipt>";
redirect("index.php?action=index&module=SfaDesktops");
}
}
}
?>