[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1890] make delete-profile slightly more robust
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1890] make delete-profile slightly more robust |
Date: |
Fri, 29 May 2009 23:38:10 +0000 |
Revision: 1890
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1890
Author: clint
Date: 2009-05-29 23:38:09 +0000 (Fri, 29 May 2009)
Log Message:
-----------
make delete-profile slightly more robust
Modified Paths:
--------------
trunk/nixtape/delete-profile.php
Modified: trunk/nixtape/delete-profile.php
===================================================================
--- trunk/nixtape/delete-profile.php 2009-05-29 23:24:07 UTC (rev 1889)
+++ trunk/nixtape/delete-profile.php 2009-05-29 23:38:09 UTC (rev 1890)
@@ -47,6 +47,7 @@
$smarty->display('error.tpl');
die ();
} else {
+ try {
$adodb->Execute('DELETE FROM Scrobble_Sessions WHERE userid = '
. $adodb->qstr($this_user->uniqueid));
$adodb->Execute('DELETE FROM Delete_Request WHERE username = '
. $adodb->qstr($username));
$adodb->Execute('DELETE FROM Auth WHERE username = ' .
$adodb->qstr($username));
@@ -58,7 +59,13 @@
$adodb->Execute('DELETE FROM User_Relationship_Flags WHERE uid2
= ' . (int)($this_user->uniqueid));
$adodb->Execute('DELETE FROM User_Relationships WHERE uid1 = '
. (int)($this_user->uniqueid));
$adodb->Execute('DELETE FROM User_Relationships WHERE uid2 = '
. (int)($this_user->uniqueid));
- $adodb->Execute('DELETE FROM Users WHERE lower(username) = ' .
$adodb->qstr(strtolower($username)));
+ $adodb->Execute('DELETE FROM Users WHERE uniqueid = ' .
($this_user->uniqueid));
+ } catch (exception $e) {
+ $smarty->assign('error', 'Error!');
+ $smarty->assign('details', 'Something went amiss.');
+ $smarty->display('error.tpl');
+ die ();
+ }
session_destroy();
header('Location: index.php');
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1890] make delete-profile slightly more robust,
Clint Adams <=