diff --git a/checkin_notes b/checkin_notes index 6aaaf8b221..0e1b8a84a0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7449,3 +7449,9 @@ Rom 15 Sept 2008 clientscr/ screensaver_win.cpp + +Eric 16 Sept 2008 + - Added additional spam fighting measure to profile.inc. Profiles for + users with RAC less than with only be displayed if + the viewing user is logged in. + diff --git a/html/inc/profile.inc b/html/inc/profile.inc index 9eb1425d59..1c2880122c 100644 --- a/html/inc/profile.inc +++ b/html/inc/profile.inc @@ -190,6 +190,17 @@ function get_profile_summary($profile) { // function show_profile($user, $logged_in_user, $screen_mode = false) { BoincForumPrefs::lookup($user); + + $is_logged_in = isset($logged_in_user); + + $can_edit = isset($logged_in_user) && $logged_in_user && $user->id == $logged_in_user->id; + + $min_credit = parse_config(get_config(), ""); + if ((!$is_logged_in) && $min_credit && $user->expavg_credit < $min_credit ) { + error_page( + "To prevent spam, profiles of users with an average credit of less than $min_credit will only be displayed to users who are logged in to their accounts. We appologize for this inconvenience." + ); + } if (is_banished($user)) { error_page("User is banished"); } @@ -198,8 +209,6 @@ function show_profile($user, $logged_in_user, $screen_mode = false) { error_page("No user profile exists for that user ID."); } - $can_edit = isset($logged_in_user) && $logged_in_user && $user->id == $logged_in_user->id; - if ($can_edit) { row1("Edit your profile"); }