aboutsummaryrefslogtreecommitdiffstats
path: root/mod/regmod.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/regmod.php')
-rw-r--r--mod/regmod.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/mod/regmod.php b/mod/regmod.php
index f03c2a3fe..abf673a92 100644
--- a/mod/regmod.php
+++ b/mod/regmod.php
@@ -25,31 +25,32 @@ function regmod_content(&$a) {
if(! count($register))
killme();
+ $user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
+ intval($register[0]['uid'])
+ );
+
if($cmd == 'deny') {
$r = q("DELETE FROM `user` WHERE `uid` = %d LIMIT 1",
intval($register[0]['uid'])
);
- $r = q("DELETE FROM `contact` WHERE `uid` = %d",
+ $r = q("DELETE FROM `contact` WHERE `uid` = %d LIMIT 1",
intval($register[0]['uid'])
);
- $r = q("DELETE FROM `profile` WHERE `uid` = %d",
+ $r = q("DELETE FROM `profile` WHERE `uid` = %d LIMIT 1",
intval($register[0]['uid'])
);
$r = q("DELETE FROM `register` WHERE `hash` = '%s' LIMIT 1",
dbesc($register[0]['hash'])
);
- notice( t('Registration revoked.') . EOL);
+ notice( t('Registration revoked for ') . $user[0]['username'] . EOL);
return;
}
if($cmd == 'allow') {
- $user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
- intval($register[0]['uid'])
- );
if(! count($user))
killme();
@@ -75,11 +76,9 @@ function regmod_content(&$a) {
$res = mail($user[0]['email'], t('Registration details for '). $a->config['sitename'],
$email_tpl,'From: ' . t('Administrator@') . $_SERVER[SERVER_NAME] );
-
if($res) {
notice( t('Account approved.') . EOL );
return;
}
-
}
} \ No newline at end of file