From 05fb140544f3f7f3f1a5757491abcea7aaf51a89 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 21 Nov 2007 00:17:56 +0000 Subject: [PATCH] svn path=/trunk/boinc/; revision=14276 --- html/inc/profile.inc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/html/inc/profile.inc b/html/inc/profile.inc index e04ac924e0..07db5a8f6e 100644 --- a/html/inc/profile.inc +++ b/html/inc/profile.inc @@ -65,12 +65,19 @@ function get_profile($userid) { } function show_profile_creation_page($user) { + $config = get_config(); + $min_credit = parse_config($config, ""); + if ($min_credit && $user->expavg_credit < $min_credit) { + error_page( + "To prevent spam, an average credit of $min_credit or greater is required to create or edit a profile. We apologize for this inconvenience." + ); + } + // If the user already has a profile, // fill in the fields with their current values. // $profile = get_profile($user->id); if (post_str("submit", true)) { - $config = get_config(); $privatekey = parse_config($config, ""); if ($privatekey) { $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], @@ -83,13 +90,6 @@ function show_profile_creation_page($user) { } } - $min_credit = parse_config($config, ""); - if ($min_credit && $user->expavg_credit < $min_credit) { - error_page( - "To prevent spam, an average credit of $min_credit or greater is required to create or edit a profile." - ); - } - process_create_profile($user, $profile); exit(); }