2006-07-05 21:38:08 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
2014-04-24 16:41:59 +00:00
|
|
|
// Copyright (C) 2014 University of California
|
2008-08-05 22:43:14 +00:00
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2006-07-05 21:38:08 +00:00
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/user.inc");
|
2007-11-12 22:28:17 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2006-07-05 21:38:08 +00:00
|
|
|
|
2011-02-09 22:11:34 +00:00
|
|
|
check_get_args(array("code", "userid"));
|
|
|
|
|
2006-07-05 21:38:08 +00:00
|
|
|
$code = get_str("code");
|
|
|
|
$userid = get_int('userid');
|
2014-04-24 16:41:59 +00:00
|
|
|
$user = BoincUser::lookup_id($userid);
|
2006-07-05 21:38:08 +00:00
|
|
|
if (!$user) {
|
2010-02-03 17:32:25 +00:00
|
|
|
error_page("no such user");
|
2006-07-05 21:38:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (salted_key($user->authenticator) != $code) {
|
2010-02-03 17:32:25 +00:00
|
|
|
error_page("invalid code");
|
2006-07-05 21:38:08 +00:00
|
|
|
}
|
|
|
|
|
2007-11-12 22:28:17 +00:00
|
|
|
$result = $user->update("send_email=0");
|
2006-07-05 21:38:08 +00:00
|
|
|
|
2007-11-12 22:28:17 +00:00
|
|
|
if ($result) {
|
2010-02-03 17:32:25 +00:00
|
|
|
page_head("Removed from mailing list");
|
2007-11-12 22:28:17 +00:00
|
|
|
echo "
|
|
|
|
No further emails will be sent to $user->email_addr.
|
2010-02-03 17:32:25 +00:00
|
|
|
<p>
|
2007-11-12 22:28:17 +00:00
|
|
|
To resume getting emails,
|
2010-02-03 17:32:25 +00:00
|
|
|
<a href=".URL_BASE."prefs_edit.php?subset=project>edit your project preferences</a>.
|
2007-11-12 22:28:17 +00:00
|
|
|
";
|
|
|
|
page_tail();
|
|
|
|
}
|
2006-07-05 21:38:08 +00:00
|
|
|
|
|
|
|
?>
|