diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-08-08 17:08:39 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-08-08 17:08:39 -0700 |
commit | 0bcd5522315649c8d4652b8bfaa9bec328b9d548 (patch) | |
tree | 1b15f4e0671964607277afd1190e6119d8898b24 /mod/regmod.php | |
parent | c9d8211ae73332b6c4e91d82ba06275b92d7523a (diff) | |
download | volse-hubzilla-0bcd5522315649c8d4652b8bfaa9bec328b9d548.tar.gz volse-hubzilla-0bcd5522315649c8d4652b8bfaa9bec328b9d548.tar.bz2 volse-hubzilla-0bcd5522315649c8d4652b8bfaa9bec328b9d548.zip |
photo album finish, general cleanup begins
Diffstat (limited to 'mod/regmod.php')
-rw-r--r-- | mod/regmod.php | 15 |
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 |