noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 02/08: when removing an user , remove also hi


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/08: when removing an user , remove also his privilege in all folders
Date: Sat, 13 Feb 2016 01:41:57 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 49fe36be24c46ab210e4dfd54167d15814ddf6d5
Author: Dany De Bontridder <address@hidden>
Date:   Thu Feb 11 16:44:48 2016 +0100

    when removing an user , remove also his privilege in all folders
---
 include/user_detail.inc.php |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/include/user_detail.inc.php b/include/user_detail.inc.php
index ef386e6..61dc4f0 100644
--- a/include/user_detail.inc.php
+++ b/include/user_detail.inc.php
@@ -90,7 +90,16 @@ else if ($sbaction == "delete")
     $cn = new Database();
     $Res = $cn->exec_sql("delete from jnt_use_dos where use_id=$1", 
array($uid));
     $Res = $cn->exec_sql("delete from ac_users where use_id=$1", array($uid));
-
+    //------------------------------------
+    // Remove user from all the dossiers
+    //------------------------------------
+    $a_dossier=$cn->get_array('select dos_id from ac_dossier');
+    if ( is_array($a_dossier) ) {
+        $nb=count($a_dossier);
+        for ( $i=0;$i<$nb;$i++)
+            User::remove_inexistant_user($a_dossier[$i]['dos_id']);
+    }
+    
     echo "<center><H2 class=\"info\"> Utilisateur " . h($_POST['fname']) . " " 
. h($_POST['lname']) . " est effacé</H2></CENTER>";
     require_once NOALYSS_INCLUDE.'/lib/class_iselect.php';
     require_once NOALYSS_INCLUDE.'/user.inc.php';



reply via email to

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