浏览代码

Added email password change to main password change

pull/24/head
Teknikode 5 年前
父节点
当前提交
9b51ad4b21
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      includes/update_profile.php

+ 11
- 0
includes/update_profile.php 查看文件

@@ -125,6 +125,17 @@ if(isset($_POST))
if ($change_password)
{
$user->hashedPassword = hashPassword($password, $CONF); //encrypt the password for storage
if (!$CONF['dev_env'])
{
$obBaseApp = new COM("hMailServer.Application");
$obBaseApp->Connect();
$obBaseApp->Authenticate($CONF['mail_admin_user'], $CONF['mail_admin_pass']);
$domain = $obBaseApp->Domains->ItemByName($CONF['host']);
$account = $domain->Accounts->ItemByAddress($user->username . "@" . $CONF['host']);
$account->Password = $password;
$account->Save();
}
}
// Add the user's keys to his git account

正在加载...
取消
保存