librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1891] make delete-profile slightly more robust


From: Clint Adams
Subject: [Librefm-commits] [1891] make delete-profile slightly more robust
Date: Fri, 29 May 2009 23:38:43 +0000

Revision: 1891
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1891
Author:   clint
Date:     2009-05-29 23:38:43 +0000 (Fri, 29 May 2009)
Log Message:
-----------
make delete-profile slightly more robust

Modified Paths:
--------------
    branches/stable/nixtape/delete-profile.php

Modified: branches/stable/nixtape/delete-profile.php
===================================================================
--- branches/stable/nixtape/delete-profile.php  2009-05-29 23:38:09 UTC (rev 
1890)
+++ branches/stable/nixtape/delete-profile.php  2009-05-29 23:38:43 UTC (rev 
1891)
@@ -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');
        }





reply via email to

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