Parcourir la source

Added email password change to main password change

pull/24/head
Teknikode il y a 5 ans
Parent
révision
9b51ad4b21
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11
    0
      includes/update_profile.php

+ 11
- 0
includes/update_profile.php Voir le fichier

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

Chargement…
Annuler
Enregistrer