librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1183] get the username from the right place


From: Clint Adams
Subject: [Librefm-commits] [1183] get the username from the right place
Date: Mon, 04 May 2009 02:27:18 +0000

Revision: 1183
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1183
Author:   clint
Date:     2009-05-04 02:27:18 +0000 (Mon, 04 May 2009)
Log Message:
-----------
get the username from the right place

Modified Paths:
--------------
    trunk/nixtape/delete-profile.php

Modified: trunk/nixtape/delete-profile.php
===================================================================
--- trunk/nixtape/delete-profile.php    2009-05-04 02:18:36 UTC (rev 1182)
+++ trunk/nixtape/delete-profile.php    2009-05-04 02:27:18 UTC (rev 1183)
@@ -24,8 +24,7 @@
 } elseif ( isset ($_GET['code'])) {
        $mdb2->exec("DELETE FROM Delete_Request WHERE expires < " . 
$mdb2->quote(time(), "integer"));
 
-       $user = new User($_SESSION['user']->name);
-       $username = $user->name;
+       $username = $this_user->name;
        $code = $_GET['code'];
        $res = $mdb2->query("SELECT * FROM Delete_Request WHERE username = 
".$mdb2->quote($username, 'text').' AND code = '.$mdb2->quote($code, 'text'));
        if (PEAR::isError($res)) {
@@ -51,11 +50,9 @@
                header("Location: index.php");
        }
 } else {
-       $user = new User($_SESSION['user']->name);
-       $username = $user->name;
        $code = generateCode();
-       $username = $user->name;
-       $email = $user->email;
+       $username = $this_user->name;
+       $email = $this_user->email;
        $expire = time()+86400;
        $mdb2->exec("INSERT INTO Delete_Request (code, expires, username) 
VALUES (".$mdb2->quote($code, 'text').', '.$mdb2->quote($expire, 
'text').",".$mdb2->quote($username, 'text').')');
        $url = $base_url."/delete-profile.php?code=".$code;





reply via email to

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