forked from GNUsocial/gnu-social
Move mail_confirm_address out of mail.php
This commit is contained in:
@@ -41,15 +41,15 @@ if (count($args) == 0) {
|
||||
|
||||
$email = $args[0];
|
||||
|
||||
$confirm = Confirm_address::getAddress($email, EmailRegistrationPlugin::CONFIRMTYPE);
|
||||
try {
|
||||
$confirm = Confirm_address::getByAddress($email, EmailRegistrationPlugin::CONFIRMTYPE);
|
||||
|
||||
if (!empty($confirm)) {
|
||||
if (have_option('d', 'dryrun')) {
|
||||
print "[Dry run mode] Deleted confirmation code {$confirm->code} for {$confirm->address}.\n";
|
||||
} else {
|
||||
$confirm->delete();
|
||||
print "Deleted confirmation code {$confirm->code} for {$confirm->address}.\n";
|
||||
}
|
||||
} else {
|
||||
print "Couldn't find an email registration code for {$email}.\n";
|
||||
} catch (NoResultException $e) {
|
||||
print "Exception thrown for {$email}: {$e->getMessage()}";
|
||||
}
|
||||
|
Reference in New Issue
Block a user