body<= {'user'}; my $u = LJ::get_authas_user($authas); return LJ::bad_input($ML{'error.invalidauth'}) unless $u; my $firstdate = $dbh->selectrow_array(qq{ SELECT MIN(timechange) FROM infohistory WHERE userid=? AND what='email' AND oldvalue=? }, undef, $u->{'userid'}, $u->{'email'}); my @deleted; if (LJ::did_post() && $u->{'status'} eq 'A') { my $sth = $dbh->prepare("SELECT timechange, oldvalue " . "FROM infohistory WHERE userid=? " . "AND what='email' ORDER BY timechange"); $sth->execute($u->{'userid'}); while (my ($time, $email) = $sth->fetchrow_array) { my $can_del = defined $firstdate && $time gt $firstdate; if ($can_del && $POST{"$email-$time"}) { push @deleted, BML::ml('.log.deleted', { 'email' => $email, 'time' => $time }); $dbh->do("UPDATE infohistory SET what='emaildeleted' WHERE what='email' " . "AND userid=? AND timechange=? AND oldvalue=?", undef, $u->{'userid'}, $time, $email); } } } my $ret; # authas switcher form $ret .= "
\n\n"; # some explanatory text $ret .= "\n"; $ret .= "\n"; $ret .= "\n"; $ret .= "\n"; unless ($u->{'status'} eq "A") { $ret .= "\n"; $ret .= " $u->{'email'} }) . " p?>"; return $ret; } # current address $ret .= "\n"; $ret .= "