mirror of https://github.com/BOINC/boinc.git
- Add "html/ops/purge_profile.php" script to help admins locate
and remove spam profiles svn path=/trunk/boinc/; revision=17753
This commit is contained in:
parent
83479d3a8f
commit
65560415fe
|
@ -3679,3 +3679,15 @@ Charlie 7 Apr 2009
|
|||
|
||||
clientgui/
|
||||
ProjectListCtrl.cpp
|
||||
|
||||
David 8 Apr 2009
|
||||
- Add "html/ops/purge_profile.php" script to help admins locate
|
||||
and remove spam profiles
|
||||
|
||||
html/
|
||||
inc/
|
||||
email.inc
|
||||
ops/
|
||||
purge_profile.php
|
||||
user/
|
||||
mail_passwd.php
|
||||
|
|
|
@ -34,7 +34,7 @@ if (isset($USE_PHPMAILER)) {
|
|||
$USE_PHPMAILER = false;
|
||||
}
|
||||
|
||||
// Function sends an email, either using PHPMailer or not.
|
||||
// send an email, using PHPMailer or not.
|
||||
//
|
||||
function send_email($user, $subject, $body, $body_html=null) {
|
||||
global $USE_PHPMAILER;
|
||||
|
@ -90,7 +90,7 @@ function send_auth_email($user) {
|
|||
$x = md5($user->id.$user->authenticator.$now);
|
||||
$x = substr($x, 0, 16);
|
||||
$subject = PROJECT." account information";
|
||||
$body = "This email was sent in reponse to a request on the ".PROJECT." web site.
|
||||
$body = "This email was sent in response to a request on the ".PROJECT." web site.
|
||||
|
||||
To log in to your ".PROJECT." account, visit:
|
||||
".$master_url."login_action.php?id=$user->id&t=$now&h=$x
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
// Script to help you purge spam profiles.
|
||||
//
|
||||
// To use: do the following query from mysql:
|
||||
//
|
||||
// select name, id from user, profile where user.id=profile.userid and match(response1, response2) against ('Viagra');
|
||||
// (replace "Viagra" with other keywords)
|
||||
//
|
||||
// Then copy the ids into the array below and run this script
|
||||
|
||||
require_once("../inc/db.inc");
|
||||
db_init();
|
||||
|
||||
$ids = array(
|
||||
9031517,
|
||||
9031518,
|
||||
);
|
||||
|
||||
foreach ($ids as $id) {
|
||||
mysql_query("delete from user where id=$id");
|
||||
mysql_query("delete from profile where userid=$id");
|
||||
}
|
||||
|
||||
?>
|
|
@ -61,7 +61,7 @@ if (!$user) {
|
|||
email_sent_message($email_addr);
|
||||
} else {
|
||||
page_head("Email failed");
|
||||
echo "Can't send email to $user->email_addr: $retval";
|
||||
echo "Can't send email to $user->email_addr";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue