Skip to content

Commit

Permalink
Fixed #1280: Removing user does not remove user rights
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/stable_plus@3385 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Thibault Le Meur committed Oct 16, 2007
1 parent 572ca8f commit 1a68932
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions admin/usercontrol.php
Expand Up @@ -248,8 +248,9 @@

if($isallowed)
{
// Wenn ein Benutzer gel??scht wird, werden die von ihm erstellten Benutzer dem Benutzer
// zugeordnet, von dem er selbst erstellt wurde
// We are about to kill an uid with potential childs
// Let's re-assign them their grand-father as their
// new parentid
$squery = "SELECT parent_id FROM {$dbprefix}users WHERE uid={$_POST['uid']}";
$sresult = $connect->Execute($squery);
$fields = $sresult->FetchRow($sresult);
Expand All @@ -264,6 +265,10 @@
$dquery="DELETE FROM {$dbprefix}users WHERE uid={$_POST['uid']}"; // added by Dennis
$dresult=$connect->Execute($dquery);

// Delete user rights
$dquery="DELETE FROM {$dbprefix}surveys_rights WHERE uid={$_POST['uid']}";
$dresult=$connect->Execute($dquery);

if($_POST['uid'] == $_SESSION['loginID']) killSession(); // user deleted himself

$addsummary .= "<br />".$clang->gT("Username").": {$_POST['user']}<br />\n";
Expand Down

0 comments on commit 1a68932

Please sign in to comment.