} else {
     if ($npw != $pwa || $npw == "") {
         $error = $strings["new_password_error"];
     } else {
         $cnpw = get_password($npw);
         if ($htaccessAuth == "true") {
             require_once "../includes/htpasswd.class.php";
             $Htpasswd = new Htpasswd();
             $tmpquery = "WHERE tea.member = '" . $_SESSION['idSession'] . "'";
             $listProjects = new request();
             $listProjects->openTeams($tmpquery);
             $comptListProjects = count($listProjects->tea_id);
             if ($comptListProjects != "0") {
                 for ($i = 0; $i < $comptListProjects; $i++) {
                     $Htpasswd->initialize("../files/" . $listProjects->tea_pro_id[$i] . "/.htpasswd");
                     $Htpasswd->changePass($_SESSION['loginSession'], $cnpw);
                 }
             }
         }
         $tmpquery = "UPDATE " . $tableCollab["members"] . " SET password='******' WHERE id = '" . $_SESSION['idSession'] . "'";
         connectSql("{$tmpquery}");
         // if mantis bug tracker enabled
         if ($enableMantis == "true") {
             // call mantis function to reset user password
             require_once "../mantis/user_reset_pwd.php";
         }
         // if CVS repository enabled
         if ($enable_cvs == "true") {
             $query = "WHERE tea.member = '" . $_SESSION['idSession'] . "'";
             $cvsMembers = new request();
             $cvsMembers->openTeams($query);
Esempio n. 2
0
 // test if 2 passwords match
 if ($pw != $pwa || $pwa == "") {
     $error = $strings["new_password_error"];
 } else {
     $pw = get_password($pw);
     if ($htaccessAuth == "true") {
         if ($un == $unOld) {
             $tmpquery = "WHERE tea.member = '{$id}'";
             $listProjects = new request();
             $listProjects->openTeams($tmpquery);
             $comptListProjects = count($listProjects->tea_id);
         }
         if ($comptListProjects != "0") {
             for ($i = 0; $i < $comptListProjects; $i++) {
                 $Htpasswd->initialize("../files/" . $listProjects->tea_pro_id[$i] . "/.htpasswd");
                 $Htpasswd->changePass($un, $pw);
             }
         }
     }
     $tmpquery = "UPDATE " . $tableCollab["members"] . " SET password='******' WHERE id = '{$id}'";
     connectSql("{$tmpquery}");
     // if mantis bug tracker enabled
     if ($enableMantis == "true") {
         // Call mantis function for user changes..!!!
         $f_access_level = $team_user_level;
         // Developer
         require_once "../mantis/user_update.php";
     }
     header("Location: ../users/listusers.php?msg=update");
     exit;
 }
Esempio n. 3
0
 } else {
     if ($npw != $pwa || $npw == "") {
         $error = $strings["new_password_error"];
     } else {
         $cnpw = get_password($npw);
         if ($htaccessAuth == "true") {
             include "../includes/htpasswd.class.php";
             $Htpasswd = new Htpasswd();
             $tmpquery = "WHERE tea.member = '{$idSession}'";
             $listProjects = new request();
             $listProjects->openTeams($tmpquery);
             $comptListProjects = count($listProjects->tea_id);
             if ($comptListProjects != "0") {
                 for ($i = 0; $i < $comptListProjects; $i++) {
                     $Htpasswd->initialize("files/" . $listProjects->tea_pro_id[$i] . "/.htpasswd");
                     $Htpasswd->changePass($loginSession, $cnpw);
                 }
             }
         }
         $tmpquery = "UPDATE " . $tableCollab["members"] . " SET password='******' WHERE id = '{$idSession}'";
         connectSql("{$tmpquery}");
         //if CVS repository enabled
         if ($enable_cvs == "true") {
             $query = "WHERE tea.member = '{$idSession}'";
             $cvsMembers = new request();
             $cvsMembers->openTeams($query);
             //change the password in every repository
             for ($i = 0; $i < count($cvsMembers->tea_id); $i++) {
                 cvs_change_password($cvsMembers->tea_mem_login[$i], $cnpw, $cvsMembers->tea_pro_id[$i]);
             }
         }