aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-08-15 14:56:17 +0200
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-08-15 14:56:17 +0200
commitf36253b7a8f3cc628b985df1ab257ff03189727c (patch)
tree21fbf0672b124ae076114340c8ead674cb41bb3a
parent21adbad4c1a0f9a7953c3c011a3669d09cfc2bb4 (diff)
downloadvolse-hubzilla-f36253b7a8f3cc628b985df1ab257ff03189727c.tar.gz
volse-hubzilla-f36253b7a8f3cc628b985df1ab257ff03189727c.tar.bz2
volse-hubzilla-f36253b7a8f3cc628b985df1ab257ff03189727c.zip
Account deletion
fix multi user deletion, add confirmation message
-rw-r--r--include/Contact.php2
-rw-r--r--mod/admin.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 47b1763cb..140f449af 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -185,6 +185,7 @@ function account_remove($account_id,$local = true,$unset_session=true) {
$r = q("select * from account where account_id = %d limit 1",
intval($account_id)
);
+ $account_email=$r[0]['account_email'];
if(! $r) {
logger('account_remove: No account with id: ' . $account_id);
@@ -207,6 +208,7 @@ function account_remove($account_id,$local = true,$unset_session=true) {
if ($unset_session) {
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);
+ notice( sprintf(t("User '%s' deleted"),$account_email) . EOL);
goaway(get_app()->get_baseurl());
}
return $r;
diff --git a/mod/admin.php b/mod/admin.php
index 230ef3011..14657bd1a 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -639,7 +639,7 @@ function admin_page_users_post(&$a){
if (x($_POST,'page_users_delete')){
require_once("include/Contact.php");
foreach($users as $uid){
- account_remove($uid,true);
+ account_remove($uid,true,false);
}
notice( sprintf( tt("%s user deleted", "%s users deleted", count($users)), count($users)) );
}