*** empty log message ***

This commit is contained in:
Rodolphe Quiedeville 2002-12-21 17:55:23 +00:00
parent 19085af235
commit e1c2ccc5c1
2 changed files with 12 additions and 1 deletions

View File

@ -49,6 +49,8 @@ class Conf {
$this->years = 2001;
$this->password_encrypted = 1;
$this->css = "theme/dolibarr/dolibarr.css";
}
}

View File

@ -190,7 +190,16 @@ class User {
$password = substr(crypt(uniqid("")),0,8);
}
$sql = "UPDATE llx_user SET pass = '".crypt($password, "CRYPT_STD_DES")."'";
if ($conf->password_encrypted)
{
$sqlpass = crypt($password, "CRYPT_STD_DES");
}
else
{
$sqlpass = $password;
}
$sql = "UPDATE llx_user SET pass = '".$sqlpass."'";
$sql .= " WHERE rowid = $this->id";
$result = $this->db->query($sql);