/[webwml]/newmaint/gpguserdel.wml
ViewVC logotype

Contents of /newmaint/gpguserdel.wml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Aug 21 00:40:04 2003 UTC (9 years, 9 months ago) by tbm
Branch: MAIN
Changes since 1.4: +5 -1 lines
Remove all place entries of a user before removing that user.
1 <?
2 session_start();
3 include("gpgconfig.inc");
4 include("common.inc");
5 include("gpgcommon.inc");
6
7 $html_end = "</TD>\n</TR>\n</TABLE>\n</BODY>\n</HTML>";
8 ?>
9 #use wml::gpgpage title="GPG Signing Coordination - Your profile"
10 <?
11 if (!session_is_registered("s_username")) {
12 ?>
13 <STRONG>You should not be here!</STRONG>
14 There's no session registered for you. Please relogin.
15 <?
16 return FALSE;
17 } else {
18 session_register("s_username");
19 }
20 ?>
21
22 <?
23 if (! ($db = open_db())) {
24 echo "<P>Cannot open database.</P>";
25 return FALSE;
26 }
27
28 if (! $doit) {
29 ?>
30
31 <H2>Delete User <? echo $s_username; ?></H2>
32 <P>Really delete your entry in the PGP Signing Coordination Database?</P>
33 <P><A HREF="gpguserdel.php?doit=1">YES</A> - <A HREF="gpgmain.php">NO</A></P>
34 <?
35 } else {
36 $sql = "DELETE FROM places WHERE who IN (SELECT id FROM people WHERE email = '$s_username')";
37 if (! ($result = pg_exec($db, $sql))) {
38 echo "Problem with query", pg_ErrorMessage($db), "<BR>";
39 return FALSE;
40 }
41 $sql = "DELETE FROM people WHERE email = '$s_username'";
42 if (! ($result = pg_exec($db, $sql))) {
43 echo "Problem with query", pg_ErrorMessage($db), "<BR>";
44 return FALSE;
45 }
46
47 session_destroy();
48 ?>
49 <H2>Delete User</H2>
50 <P>You should have been removed from the database</P>
51 <?
52 }
53 return TRUE;
54 ?>

  ViewVC Help
Powered by ViewVC 1.1.5