This commit has been accessed 987 times via Git panel.
commit 2f785d86eda00c58cd3ce3065836bab2c993081e
tree 83f24b00aa8a7c3ed57cf747a72382c7b59eae08
parent 6aac5d6c3ea42d6550192b178d810d5284171841
author Engels Antonio <engels@majcms.org> 1353884811 +0800
committer Engels Antonio <engels@majcms.org> 1353884811 +0800
Add contacts clean up for deleted accounts
diff --git a/index.php b/index.php
index 38b47e5..3cabb5c 100644
--- a/index.php
+++ b/index.php
@@ -622,7 +622,8 @@ if (isset($_SESSION['logged_uid'])) {
$pm_query = mysql_query("delete from aliases where alias='$pm_del'");
$pm_query = mysql_query("delete from users where id='$pm_del'");
-
+ $pm_query = mysql_query("delete from contacts where id='$pm_del'");
+
if (!$pm_query) {
nak(strtolower(mysql_error()));
}
@@ -645,6 +646,12 @@ if (isset($_SESSION['logged_uid'])) {
if (count(glob("$mail_home/{$_SESSION['logged_uid']}/$pm_init/*")) < 1) {
rmdir("$mail_home/{$_SESSION['logged_uid']}/$pm_init");
}
+
+ $pm_con = sha1($pm_del);
+
+ if (file_exists("images/contacts/$pm_con")) {
+ rmdirr("images/contacts/$pm_con");
+ }
ack("$pm_del deleted");
}
tree 83f24b00aa8a7c3ed57cf747a72382c7b59eae08
parent 6aac5d6c3ea42d6550192b178d810d5284171841
author Engels Antonio <engels@majcms.org> 1353884811 +0800
committer Engels Antonio <engels@majcms.org> 1353884811 +0800
Add contacts clean up for deleted accounts
diff --git a/index.php b/index.php
index 38b47e5..3cabb5c 100644
--- a/index.php
+++ b/index.php
@@ -622,7 +622,8 @@ if (isset($_SESSION['logged_uid'])) {
$pm_query = mysql_query("delete from aliases where alias='$pm_del'");
$pm_query = mysql_query("delete from users where id='$pm_del'");
-
+ $pm_query = mysql_query("delete from contacts where id='$pm_del'");
+
if (!$pm_query) {
nak(strtolower(mysql_error()));
}
@@ -645,6 +646,12 @@ if (isset($_SESSION['logged_uid'])) {
if (count(glob("$mail_home/{$_SESSION['logged_uid']}/$pm_init/*")) < 1) {
rmdir("$mail_home/{$_SESSION['logged_uid']}/$pm_init");
}
+
+ $pm_con = sha1($pm_del);
+
+ if (file_exists("images/contacts/$pm_con")) {
+ rmdirr("images/contacts/$pm_con");
+ }
ack("$pm_del deleted");
}