aboutsummaryrefslogtreecommitdiffstats
path: root/mod/removeme.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-08-18 18:55:18 +0200
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-08-18 18:55:18 +0200
commitb5d1c7865b14fa60c35618b4179eb3c91949a441 (patch)
tree38ddb2fcab0f4c2c3baf6917e3544148cbe1eb9e /mod/removeme.php
parent3b979dd2a9f8bb8f569c234408d02dfd1e7039d7 (diff)
parentd9ff121930554aa9bcad4f4ceffeb9b5e3b83d17 (diff)
downloadvolse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.gz
volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.bz2
volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.zip
Merge pull request #1 from friendica/master
Red master has been merged
Diffstat (limited to 'mod/removeme.php')
-rw-r--r--mod/removeme.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/removeme.php b/mod/removeme.php
index f0b4ae3c0..13bf6cf63 100644
--- a/mod/removeme.php
+++ b/mod/removeme.php
@@ -23,11 +23,19 @@ function removeme_post(&$a) {
if(! account_verify_password($account['account_email'],$_POST['qxz_password']))
return;
+ if($account['account_password_changed'] != '0000-00-00 00:00:00') {
+ $d1 = datetime_convert('UTC','UTC','now - 48 hours');
+ if($account['account_password_changed'] > d1) {
+ notice( t('Channel removals are not allowed within 48 hours of changing the account password.') . EOL);
+ return;
+ }
+ }
+
require_once('include/Contact.php');
$global_remove = intval($_POST['global']);
- channel_remove(local_user(),1 - $global_remove);
+ channel_remove(local_user(),1 - $global_remove,true);
}