[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 29/46: Task #0001793: Installation mot de pas
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 29/46: Task #0001793: Installation mot de passe for password , use NOALYSS_ADMIN_PASSWORD |
Date: |
Mon, 4 May 2020 13:38:51 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 4dcae09efe8a718c3fedf7e66b827aeee4d33a7a
Author: Dany De Bontridder <address@hidden>
AuthorDate: Tue Mar 24 14:21:48 2020 +0100
Task #0001793: Installation mot de passe
for password , use NOALYSS_ADMIN_PASSWORD
---
html/install.php | 16 ++++++++++------
include/lib/config_file.php | 4 ++--
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/html/install.php b/html/install.php
index a83e7e1..ca76438 100644
--- a/html/install.php
+++ b/html/install.php
@@ -272,6 +272,7 @@ if (isset($_POST['save_config'])) {
//
//------------------------------------------------------------------------
if ( ! file_exists(NOALYSS_INCLUDE.'/config.inc.php')) {
+
echo '<h1 class="info">'._('Entrez les informations nécessaires à
noalyss').'</h1>';
echo '<form method="post">';
require_once NOALYSS_INCLUDE.'/lib/config_file.php';
@@ -524,7 +525,7 @@ if ($account == 0 ) {
$cn->execute_script(NOALYSS_INCLUDE."/sql/account_repository/constraint.sql");
/* update name administrator */
$cadmin=NOALYSS_ADMINISTRATOR;
- $cn->exec_sql("update ac_users set
use_login=$1,use_password=md5($2),use_active=1 where use_id=1",
+ $cn->exec_sql("update ac_users set
use_login=$1,use_pass=md5($2),use_active=1 where use_id=1",
array(strtolower($cadmin),$icpassword_admin));
$cn->commit($cn);
@@ -619,11 +620,11 @@ if (defined("MULTI") && MULTI == 0)
}
}
- $db->exec_sql("update ac_users set use_login=$1 where use_id=1",
- array(strtolower(NOALYSS_ADMINISTRATOR)));
+ $db->exec_sql("update ac_users set use_login=$1,use_pass=2 where
use_id=1",
+ array(strtolower(NOALYSS_ADMINISTRATOR),NOALYSS_ADMIN_PASSWORD));
echo '<h1>'._('Important').'</h1>';
echo '<p>'._('Utilisateur administrateur'),'
',NOALYSS_ADMINISTRATOR,'</p>';
- echo '<p>',_('Mot de passe par défaut à l\'installation'),'
phpcompta','</p>';
+
echo "<h2 class=\"warning\">";
printf (" VOUS DEVEZ EFFACER CE FICHIER %s",__FILE__);
echo "</h2>";
@@ -642,9 +643,12 @@ define ('ALLOWED',1);
define ('ALLOWED_ADMIN',1);
$rep=new Database();
-if (defined(NOALYSS_ADMINISTRATOR))
+if (defined(NOALYSS_ADMINISTRATOR) && defined (NOALYSS_ADMIN_PASSWORD))
{
- $rep->exec_sql("update ac_users set use_login=$1 where use_id=1",
array(strtolower(NOALYSS_ADMINISTRATOR)));
+ $rep->exec_sql("update ac_users set use_login=$1 ,use_pass=md5(2)
+ where use_id=1",
+ array(strtolower(NOALYSS_ADMINISTRATOR),
+ NOALYSS_ADMIN_PASSWORD));
}
Dossier::upgrade();
echo '<h1>'._('Important').'</h1>';
diff --git a/include/lib/config_file.php b/include/lib/config_file.php
index f9c89ee..3f9f722 100644
--- a/include/lib/config_file.php
+++ b/include/lib/config_file.php
@@ -161,9 +161,9 @@ function display_file_config($p_array,$from_setup=1,$p_os=1)
print ("\r\n");
print ("// For changing the password of admin, go to preference or update
in db");
print ("\r\n");
- print ("// this password is only used when installing ");
+ print ("// this password is only used when executing install.php ");
print ("\r\n");
- print ( 'define ("NOALYSS_PASSWORD","'.$icpassword_admin.'");');
+ print ( 'define ("NOALYSS_ADMIN_PASSWORD","'.$icpassword_admin.'");');
print ("\r\n");
print ( 'define ("LOCALE",'.$clocale.');');
- [Noalyss-commit] [noalyss] 32/46: Task #0001793: Installation mot de passe Empêche @mobile , doc, (continued)
- [Noalyss-commit] [noalyss] 32/46: Task #0001793: Installation mot de passe Empêche @mobile , doc, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 34/46: Bug #0001245: Type actif - passif pour nouvelle fiche à partir de fiche Erreur dans PARM_POSTE pour la compta française, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 35/46: Bug #0001245: Type actif - passif pour nouvelle fiche à partir de fiche Erreur dans PARM_POSTE pour la compta française, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 28/46: Task #0001793: Installation mot de passe remove debug info, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 33/46: Task #1277 : RTF conversion char accentuated, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 36/46: Merge branch 'dev7202', Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 38/46: Fiche.Test : add test cmp_name and get_row, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 40/46: Fix cosmetic and typo, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 22/46: HtmlOutput tab , add mode row, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 27/46: Task #0001793: Installation mot de passe, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 29/46: Task #0001793: Installation mot de passe for password , use NOALYSS_ADMIN_PASSWORD,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 31/46: Task #0001793: Installation mot de passe Adapt comment, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 37/46: Bug database.class.php : n'applique pas le patch, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 39/46: Test Unit Acc_Account_Legder , rounded value fixed, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 41/46: Cleanup + new logo, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 43/46: Improve installation for MONO : doc + password, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 45/46: Output_Tab : set mode to row by default + cosmetic, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 46/46: Merge branch 'dev7220' into pre7300, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 42/46: Improve installation for MONO : doc + password, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 44/46: fixup! Fix cosmetic and typo, Dany De Bontridder, 2020/05/04