Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
tvroom committed May 11, 2004
1 parent 51edf22 commit 4402079
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions themes/slashcode/htdocs/users.pl
Expand Up @@ -284,6 +284,13 @@ sub main {
formname => $formname,
checks => [],
},
force_acct_verify => {
function => \&forceAccountVerify,
seclev => 100,
formname => $formname,
checks => []
}

} ;

# Note this is NOT the default op. "userlogin" or "userinfo" is
Expand Down Expand Up @@ -2676,6 +2683,40 @@ sub listAbuses {
});
}

#################################################################

sub forceAccountVerify {
my $user = getCurrentUser();
my $form = getCurrentForm();
my $slashdb = getCurrentDB();
my $constants = getCurrentStatic();

my $uid = $form->{uid};
my $useredit = $slashdb->getUser($uid);

if($useredit->{uid}){
my $newpasswd = $slashdb->resetUserAccount($uid);
$slashdb->deleteLogToken($uid, 1);
my $emailtitle = getTitle('reset_acct_email_title', {
nickname => $useredit->{nickname}
}, 1);

my $msg = getMessage('reset_acct_msg', {
newpasswd => $newpasswd,
tempnick => $useredit->{nickname},
}, 1);

$slashdb->setUser($useredit->{uid}, {
waiting_for_account_verify => 1,
account_verify_request_time => $slashdb->getTime()
});

doEmail($useredit->{uid}, $emailtitle, $msg) if $useredit->{uid};
}

print getMessage("reset_acct_complete", { useredit => $useredit }, 1);
}

#################################################################
sub displayForm {
my($hr) = @_;
Expand Down Expand Up @@ -2928,6 +2969,8 @@ sub getUserAdmin {

if ($ipid and !$subnetid) {
$ipid = md5_hex($ipid) if length($ipid) != 32;
$proxy_check->{ipid} = $ipid;
$proxy_check->{currently} = $slashdb->getKnownOpenProxy($ipid, "ipid");
$subnetid = $reader->getSubnetFromIPID($ipid);
}

Expand Down

0 comments on commit 4402079

Please sign in to comment.