diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-06-02 16:17:25 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net ; true> | 2011-06-02 16:17:25 -0700 |
commit | f08eb1640388e1f067102a22ec40c30f263d92c6 (patch) | |
tree | a73f2d21cff6427b9619e7072fc90a228bd7dc78 /htdocs/moderate/users/delete.php | |
parent | 91feef607687b1262a949835cffd850cdd819846 (diff) |
Added user management
Diffstat (limited to 'htdocs/moderate/users/delete.php')
-rw-r--r-- | htdocs/moderate/users/delete.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/htdocs/moderate/users/delete.php b/htdocs/moderate/users/delete.php new file mode 100644 index 0000000..f721f30 --- /dev/null +++ b/htdocs/moderate/users/delete.php @@ -0,0 +1,43 @@ +<?php + +/* Foursquare Community Site + * + * Copyright (C) 2011 Foursquare Church. + * + * Developers: Jesse Morgan <jmorgan@foursquarestaff.com> + * + */ + +require_once('../../src/base.inc.php'); + +$error = ''; + +$user = false; +if (isset($_GET['id']) and is_numeric($_GET['id'])) { + $user = User::getById($_GET['id']); + + if ($user !== false and isset($_GET['confirmed'])) { + $user->delete(); + + header('Location: index.php'); + } + +} + +require_once('../src/header.inc.php'); + +echo "<h3>Delete Users</h3>"; + +if ($user !== false) { + echo "<p>Are you sure you want to delete " . $user->getName() ."?</p>" + . "<p><a href=\"delete.php?id=". $user->getId() ."&confirmed\">Yes</a>" + . " <a href=\"index.php\">No</a></p>"; + +} else { + echo "<p>No user to delete.</p>"; +} + +require_once('../src/footer.inc.php'); + +?> + |