summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-07-31 21:41:14 +0200
committerMichael Tänzer <neo@nhng.de>2013-07-31 21:41:14 +0200
commit8eda282ba927f7c6aea540cacbd2b91e80b3f640 (patch)
tree104eac7aef27836ede98b85585aca89a3fa24848 /includes
parent5e7476106c99cad7ba9e954dbba39bbafeee19ae (diff)
downloadcacert-devel-8eda282ba927f7c6aea540cacbd2b91e80b3f640.tar.gz
cacert-devel-8eda282ba927f7c6aea540cacbd2b91e80b3f640.tar.xz
cacert-devel-8eda282ba927f7c6aea540cacbd2b91e80b3f640.zip
bug 893: A bit more efficiency in account_delete()
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'includes')
-rw-r--r--includes/notary.inc.php38
1 files changed, 22 insertions, 16 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index 63aa40e..1fcd825 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -865,24 +865,27 @@
mysql_query($query);
//delete all other email address
- $query = "select * from `email` where `memid`='".$id."' and `id`!='".$emailid."'" ;
+ $query = "select `id` from `email` where `memid`='".$id."' and `id`!='".$emailid."'" ;
$res=mysql_query($query);
while($row = mysql_fetch_assoc($res)){
account_email_delete($row['id']);
}
//delete all domains
- $query = "select * from `domains` where `memid`='".$id."'";
+ $query = "select `id` from `domains` where `memid`='".$id."'";
$res=mysql_query($query);
while($row = mysql_fetch_assoc($res)){
account_domain_delete($row['id']);
}
//clear alert settings
- mysql_query("update `alerts` set `general`='0' where `memid`='$id'");
- mysql_query("update `alerts` set `country`='0' where `memid`='$id'");
- mysql_query("update `alerts` set `regional`='0' where `memid`='$id'");
- mysql_query("update `alerts` set `radius`='0' where `memid`='$id'");
+ mysql_query(
+ "update `alerts` set
+ `general`='0',
+ `country`='0',
+ `regional`='0',
+ `radius`='0'
+ where `memid`='$id'");
//set default location
$query = "update `users` set `locid`='2256755', `regid`='243', `ccid`='12' where `id`='".$id."'";
@@ -926,16 +929,19 @@
mysql_query($query);
//clear all admin and board flags
- mysql_query("update `users` set `assurer`='0' where `id`='$id'");
- mysql_query("update `users` set `assurer_blocked`='0' where `id`='$id'");
- mysql_query("update `users` set `codesign`='0' where `id`='$id'");
- mysql_query("update `users` set `orgadmin`='0' where `id`='$id'");
- mysql_query("update `users` set `ttpadmin`='0' where `id`='$id'");
- mysql_query("update `users` set `locadmin`='0' where `id`='$id'");
- mysql_query("update `users` set `admin`='0' where `id`='$id'");
- mysql_query("update `users` set `adadmin`='0' where `id`='$id'");
- mysql_query("update `users` set `tverify`='0' where `id`='$id'");
- mysql_query("update `users` set `board`='0' where `id`='$id'");
+ mysql_query(
+ "update `users` set
+ `assurer`='0',
+ `assurer_blocked`='0',
+ `codesign`='0',
+ `orgadmin`='0',
+ `ttpadmin`='0',
+ `locadmin`='0',
+ `admin`='0',
+ `adadmin`='0',
+ `tverify`='0',
+ `board`='0'
+ where `id`='$id'");
//block account
mysql_query("update `users` set `locked`='1' where `id`='$id'"); //, `deleted`=Now()