noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 43/86: Fix Create user , password not set


From: dwm
Subject: [Noalyss-commit] [noalyss] 43/86: Fix Create user , password not set
Date: Thu, 19 Sep 2024 02:41:53 -0400 (EDT)

sparkyx pushed a commit to branch unstable
in repository noalyss.

commit c46b22623950fb52aa5d4446591456a786b43555
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Sep 7 17:27:51 2024 +0200

    Fix Create user , password not set
---
 include/user.inc.php        | 5 +++--
 include/user_detail.inc.php | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/user.inc.php b/include/user.inc.php
index c9d7bfa07..0a452a1b6 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -63,12 +63,13 @@ if ( isset ($_POST["ADD"]) )
     {
         $exist_user=$cn->get_value("select count(*) from ac_users where 
use_login=lower($1)",[$login]);
         if ( $exist_user == 0 ) {
+            $new_user->setPassword($pass5);
             $new_user->insert();
             $new_user->load();
              put_global(array(['key'=>'use_id',"value"=>$new_user->id]));
             Noalyss_user::audit_admin(sprintf('ADD USER %s 
%s',$new_user->id,$login));
         } else {
-     echo_warning(_("Utilisateur existant"));
+            echo_warning(_("Utilisateur existant"));
             $uid=$cn->get_value("select use_id from ac_users where 
use_login=lower($1)",[$login]);
             $new_user->setId($uid);
             put_global(array(['key'=>'use_id',"value"=>$new_user->id]));
@@ -147,7 +148,7 @@ else if ($sbaction == "delete")
         echo "code [$code] code control [$ctl_code]";
     }
     if ( $code != $ctl_code) {
-        echo _("Code invalide, effacement refusé");
+        echo_warning (_("Code invalide, effacement refusé"));
         return;
     }
     $cn = new Database();
diff --git a/include/user_detail.inc.php b/include/user_detail.inc.php
index 9184a8e7e..232b1bce6 100644
--- a/include/user_detail.inc.php
+++ b/include/user_detail.inc.php
@@ -129,8 +129,8 @@ $it_pass->value="";
 <div id="delete_user_div" class="inner_box" style="display: none">
 <?=HtmlInput::title_box(_("Effacer"),'delete_user_div','hide')?>
 <FORM  id="user_detail_frm" METHOD="POST">
-    <INPUT   type="hidden" NAME="lname" value="<?=_("$UserChange->name")?>">
-    <INPUT type="hidden" NAME="fname" 
value="<?=_("$UserChange->first_name")?>">
+    <INPUT   type="hidden" NAME="lname" value="<?="$UserChange->name"?>">
+    <INPUT type="hidden" NAME="fname" value="<?="$UserChange->first_name"?>">
     <?php echo HtmlInput::hidden('UID',$uid)?>
     <?php echo HtmlInput::hidden('use_id',$uid)?>
     <input type="hidden" name="sbaction" value="delete">



reply via email to

[Prev in Thread] Current Thread [Next in Thread]