Bladeren bron

Added email password change to main password change

pull/24/head
Teknikode 5 jaren geleden
bovenliggende
commit
9b51ad4b21
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11
    0
      includes/update_profile.php

+ 11
- 0
includes/update_profile.php Bestand weergeven

@@ -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

Laden…
Annuleren
Opslaan